{
  "schema": "sync-camera-research-measurements-v1",
  "pairedComparisons": [
    {
      "label": "Native AVFoundation vs Chromium Capture (1080p60)",
      "date": "2026-09-18",
      "durationSeconds": 600,
      "configuration": {
        "resolution": "1920x1080",
        "targetFps": 60,
        "arm": "native",
        "producer": "paced-producer.mjs (1920x1080 RGBA8 monotonic deadline dispatch)",
        "daemon": "syncd (0.2.68)",
        "extension": "io.noisefactor.sync.camera (0.2.68)",
        "avfConsumer": "avf-consumer.bin (AVCaptureSession, AVCaptureVideoDataOutput, BGRA)",
        "chromeConsumer": "Chromium 153.0.8010.52 (MediaStreamTrackProcessor, maxBufferSize 4, NV12)"
      },
      "avfoundationArm": {
        "receiver": "avf",
        "windowDurationSeconds": 599.982,
        "totalArrivals": 23664,
        "distinctPictures": 23664,
        "uniqueFps": 39.441183235497064,
        "consecutiveRepeats": 0,
        "repeatRatePercent": 0.0,
        "timestampIntervalMs": {
          "count": 23663,
          "unit": "ms",
          "percentileMethod": "nearest-rank on sorted data (rank = ceil(p*n), 1-based)",
          "sdMethod": "sample (n-1)",
          "mean": 25.35534420826729,
          "sd": 12.581824475198792,
          "min": 12.700000762939453,
          "max": 138.1200008392334,
          "p1": 12.930000305175781,
          "p5": 13.030000686645508,
          "p50": 18.89000129699707,
          "p95": 45.06999969482422,
          "p99": 55.90999984741211,
          "clock": "CMSampleBuffer pts (host time stamped by the daemon sink at enqueue)",
          "zeroCount": 0,
          "zeroNote": "consecutive in-window arrivals carrying the same frame timestamp: the same capture sample delivered twice (a pair straddling the window edge is not counted, as with intervals)"
        },
        "completeSecondsBelow50": 591,
        "completeSecondsBelow55": 593,
        "consumerDrops": 0,
        "missingSequence": 12332,
        "missingSkippedByProducer": 12332,
        "missingUnexplained": 0,
        "producerSkips": 12335,
        "producerWriteUsP95": 30552.333,
        "stageLatencyMs": {
          "submitToArrival": {
            "count": 23664,
            "unit": "ms",
            "percentileMethod": "nearest-rank on sorted data (rank = ceil(p*n), 1-based)",
            "sdMethod": "sample (n-1)",
            "mean": 34.09934462108186,
            "sd": 18.41425423947834,
            "min": -2.2060546875,
            "max": 195.517822265625,
            "p1": 2.150634765625,
            "p5": 7.0400390625,
            "p50": 34.376220703125,
            "p95": 63.468505859375,
            "p99": 79.2734375,
            "label": "submit -> arrival",
            "description": "producer socket write (submitNs) to the reader receiving the sample: every hop",
            "clock": "cross-process (epoch ms both sides): measured bound 19.63 ms (producer anchor 1.00 ms + AVF epoch-minus-host spread 18.63 ms over the recording)"
          },
          "submitToPts": {
            "count": 23664,
            "unit": "ms",
            "percentileMethod": "nearest-rank on sorted data (rank = ceil(p*n), 1-based)",
            "sdMethod": "sample (n-1)",
            "mean": 30.86896567703183,
            "sd": 18.370037096643653,
            "min": -3.204703125,
            "max": 193.946031265625,
            "p1": -0.5041464843750001,
            "p5": 3.532564453125,
            "p50": 31.71772853125,
            "p95": 59.937857421875,
            "p99": 75.11557325,
            "label": "submit -> pts (daemon sink stamp)",
            "description": "producer socket write to the daemon CMIO sink stamping the sample pts at enqueue (mach host time); daemon side only, before the sink queue; the extension does not touch it",
            "clock": "cross-process (epoch ms both sides): measured bound 19.63 ms (producer anchor 1.00 ms + AVF epoch-minus-host spread 18.63 ms over the recording); derived as submit -> arrival minus the same-clock pts -> arrival"
          },
          "ptsToArrival": {
            "count": 23664,
            "unit": "ms",
            "percentileMethod": "nearest-rank on sorted data (rank = ceil(p*n), 1-based)",
            "sdMethod": "sample (n-1)",
            "mean": 3.2303789440500337,
            "sd": 1.5717902330662676,
            "min": 0.467625,
            "max": 21.030041,
            "p1": 0.621833,
            "p5": 0.851791,
            "p50": 3.219625,
            "p95": 5.738958,
            "p99": 6.650833,
            "label": "pts -> arrival",
            "description": "daemon sink enqueue to AVF delegate entry: the sink queue wait (depth 3), the extension 4 ms poll and relay, and AVF capture; not AVF capture alone",
            "clock": "same host clock (mach_absolute_time on both stamps): no cross-clock uncertainty"
          }
        },
        "accountingValid": true
      },
      "chromiumArm": {
        "receiver": "chrome",
        "windowDurationSeconds": 599.999,
        "totalArrivals": 30031,
        "distinctPictures": 23754,
        "uniqueFps": 39.5900659834433,
        "consecutiveRepeats": 6277,
        "repeatRatePercent": 20.90173487396357,
        "zeroMsTimestampPairs": 4529,
        "timestampIntervalMs": {
          "count": 30030,
          "unit": "ms",
          "percentileMethod": "nearest-rank on sorted data (rank = ceil(p*n), 1-based)",
          "sdMethod": "sample (n-1)",
          "mean": 19.97867132867133,
          "sd": 17.68207735153446,
          "min": 0.0,
          "max": 269.1000003814697,
          "p1": 0.0,
          "p5": 0.0,
          "p50": 16.80000114440918,
          "p95": 49.39999961853027,
          "p99": 87.10000038146973,
          "clock": "frame.timestamp (VideoFrame, us; intervals only, origin not assumed)",
          "zeroCount": 4529,
          "zeroNote": "consecutive in-window arrivals carrying the same frame timestamp: the same capture sample delivered twice (a pair straddling the window edge is not counted, as with intervals)"
        },
        "completeSecondsBelow50": 155,
        "completeSecondsBelow55": 396,
        "readerErrors": 0,
        "missingSequence": 12247,
        "missingSkippedByProducer": 11915,
        "missingUnexplained": 332,
        "producerSkips": 11914,
        "producerWriteUsP95": 39481.291,
        "stageLatencyMs": {
          "submitToArrival": {
            "count": 23754,
            "unit": "ms",
            "percentileMethod": "nearest-rank on sorted data (rank = ceil(p*n), 1-based)",
            "sdMethod": "sample (n-1)",
            "mean": 68.9218921229385,
            "sd": 38.97299105410582,
            "min": 35.89697265625,
            "max": 526.7255859375,
            "p1": 38.39892578125,
            "p5": 40.494384765625,
            "p50": 58.967041015625,
            "p95": 113.296142578125,
            "p99": 279.408447265625,
            "label": "submit -> arrival",
            "description": "producer socket write (submitNs) to the reader receiving the sample: every hop",
            "clock": "cross-process (epoch ms both sides): measured bound 4.70 ms (producer anchor 1.00 ms + Chrome page anchor offset max(|start| 0.40, |end| 3.70) ms)"
          }
        },
        "accountingValid": false
      }
    }
  ]
}