{
  "schemaVersion": 1,
  "slug": "pino-vs-console-structured-logging",
  "tool": {
    "name": "Pino",
    "repo": "pinojs/pino",
    "version": "10.4.0"
  },
  "environment": {
    "arch": "aarch64",
    "cpu": "Neoverse-N1 x2, CPUQuota 150%",
    "memMB": 2048,
    "os": "Ubuntu 24.04.4 LTS",
    "runtime": "Node.js 24.21.0"
  },
  "method": {
    "hypothesis": "README 주장: Pino가 대안보다 속도에서 5배를 넘는 경우가 많다고 제시한다. 이 환경에서 확인: 출력 소비 비용을 제거한 구조화 로그 기록에서 Pino의 중앙값 시간이 Console 기반 JSON 로그보다 낮은지 확인한다.",
    "conditions": [
      "원문이 포괄한 다양한 대안과 달리 Node 런타임에서 Console 기반 JSON 로그와 비교한다.",
      "결정적으로 생성한 요청 완료 레코드를 각 구현에 같은 순서와 메시지로 기록한다.",
      "측정 전 각 구현을 한 번 워밍업하고, 로그 출력은 동일한 메모리 폐기 스트림으로 보낸다.",
      "speedup이 1보다 크면 같은 방향으로 판정한다."
    ],
    "repeats": 7
  },
  "script": "import pino from 'pino';\nimport { Writable } from 'node:stream';\nimport { Console } from 'node:console';\n\nclass NullWritable extends Writable {\n  _write(_chunk, _encoding, callback) { callback(); }\n}\n\nconst sink = new NullWritable();\nconst logger = pino({ base: null, timestamp: false }, sink);\nconst baseline = new Console({ stdout: sink, stderr: sink });\nconst records = Array.from({ length: 20000 }, (_, i) => ({ requestId: `req-${i}`, route: '/api/items', statusCode: 200, durationMs: i % 100, userId: `user-${i % 1000}` }));\n\nfunction pinoPass() {\n  for (const record of records) logger.info(record, 'request completed');\n}\nfunction consolePass() {\n  for (const record of records) baseline.log(JSON.stringify({ level: 30, msg: 'request completed', ...record }));\n}\n\npinoPass();\nconsolePass();\n\nconst startPino = process.hrtime.bigint();\npinoPass();\nconst pinoMs = Number(process.hrtime.bigint() - startPino) / 1e6;\nconst startConsole = process.hrtime.bigint();\nconsolePass();\nconst consoleMs = Number(process.hrtime.bigint() - startConsole) / 1e6;\n\nconsole.log(JSON.stringify({ pinoMs, consoleMs }));",
  "scriptSha256": "c07c7c4d6952baef7c30ca5783551e462159fde202352d86d0cf7e91ec0a9973",
  "runs": [
    {
      "run": 1,
      "pinoMs": 45.162442,
      "consoleMs": 24.945,
      "wallMs": 315.343
    },
    {
      "run": 2,
      "pinoMs": 46.735734,
      "consoleMs": 25.442044,
      "wallMs": 317.521
    },
    {
      "run": 3,
      "pinoMs": 45.878607,
      "consoleMs": 24.162874,
      "wallMs": 315.34
    },
    {
      "run": 4,
      "pinoMs": 46.436093,
      "consoleMs": 23.945392,
      "wallMs": 315.058
    },
    {
      "run": 5,
      "pinoMs": 45.819447,
      "consoleMs": 23.802551,
      "wallMs": 317.181
    },
    {
      "run": 6,
      "pinoMs": 47.091218,
      "consoleMs": 25.148401,
      "wallMs": 315.666
    },
    {
      "run": 7,
      "pinoMs": 46.348412,
      "consoleMs": 24.277994,
      "wallMs": 316.992
    }
  ],
  "summary": {
    "pinoMs": {
      "median": 46.348412,
      "min": 45.162442,
      "max": 47.091218,
      "unit": "ms"
    },
    "consoleMs": {
      "median": 24.277994,
      "min": 23.802551,
      "max": 25.442044,
      "unit": "ms"
    },
    "speedup": 0.523815
  },
  "chart": {
    "title": {
      "ko": "구조화 로그 기록 시간",
      "en": "Structured logging time"
    },
    "series": [
      {
        "id": "pino",
        "role": "target",
        "label": {
          "ko": "Pino",
          "en": "Pino"
        },
        "short": {
          "ko": "Pino",
          "en": "Pino"
        }
      },
      {
        "id": "console",
        "role": "baseline",
        "label": {
          "ko": "Console JSON 로그",
          "en": "Console JSON logging"
        },
        "short": {
          "ko": "Console",
          "en": "Console"
        }
      }
    ],
    "panels": [
      {
        "title": {
          "ko": "로그 기록 시간",
          "en": "Logging time"
        },
        "unit": "ms",
        "kind": "time",
        "better": "lower",
        "keys": {
          "pino": "pinoMs",
          "console": "consoleMs"
        }
      }
    ]
  },
  "createdAt": "2026-10-21T02:11:19Z",
  "claim": {
    "quote": "In many cases, Pino is over 5x faster than alternatives.",
    "url": "https://github.com/pinojs/pino#readme",
    "numbers": [
      5
    ]
  }
}
