Skip to content
zit Artifact [4a5542be70]
Login

Artifact [4a5542be70]

Artifact 4a5542be70d7b5e6366238b7e4c8d133aff6fd59ae4c40c0984323ea298c1eee:


{
  "schema": "zit-storage-baseline/1",
  "plan": "docs/plans/storage-delta-base-selection.md",
  "plan_section": "§4 (Bench harness FIRST — step 1 baseline)",
  "step": "8/step-1 baseline",
  "stamped": false,
  "stamped_note": "File name is 'unstamped': the fossil-bench corpora are NOT yet pinned (corpora.json trunk_hash == null for both). Observed trunk hashes are recorded below for reproducibility, but a future run could see upstream drift until these are written back into corpora/corpora.json as pins per corpora/snapshot.sh.",
  "provenance": {
    "generated_utc": "2026-07-17",
    "host": { "os": "macOS 26.5 (25F71)", "kernel": "Darwin", "arch": "arm64" },
    "tool_versions": {
      "zit": "0.0.0 (targets Fossil RFC rev 00), built -Doptimize=ReleaseFast",
      "fossil": "2.28 [52445a27f1] 2026-03-11",
      "zig": "0.16.0"
    },
    "zit_checkout": "9478fe4fb762f39407585bbc9423dc0705bcb0e2 (branch storage)",
    "harnesses": [
      "fossil-bench @ /Users/dmestas/fossil-bench (drivers/DRIVER_SPEC.md); loopback fossil server + zit clone / fossil clone; store-size = raw file bytes",
      "zit build bench -- storage <path> (src/storage_benchmark.zig): frame-class bytes-at-rest + serve CPU, read-only over the physical .zit"
    ],
    "comparison_class": "approximate",
    "comparison_note": "Total store size is not like-for-like across store shapes (fossil-bench clone_store_total_bytes caveat). fossil's number is its whole .fossil (content blobs + SQLite b-tree indices + derived tables); zit's number is the whole .zit log (content frames + 64-byte header, no separate index file). Content-only size (store-content-size) is unsupported by both drivers today, so the honest comparison class is 'approximate', not 'like-for-like'."
  },
  "ingest_path": {
    "method": "CLONE/SYNC — fossil server serves the pinned snapshot over loopback; both zit and fossil clone it anonymously. This exercises zit putDeltaContainer verbatim-frame storage (the production ingest path per plan §1/§5.2), i.e. the peer's wire deltas land at rest verbatim.",
    "both_impls_cloned_same_served_corpus": true
  },
  "harness_gaps": {
    "note": "Rule 7 — reported only what the harness measured. The following requested metrics are NOT emitted by the current storage harness and were NOT synthesized:",
    "chain_depth_p50_p99": "NOT MEASURED. src/storage_benchmark.zig does not yet emit a delta-chain-depth histogram; plan §4.3 explicitly lists this as a metric to ADD ('chain-depth histogram') in a later increment. No p50/p99 fabricated.",
    "put_us_per_artifact": "NOT MEASURED by the storage harness. 'zig build bench -- storage' times SERVE CPU only (produce §4.1/§7.2 wire form), not the put path. A pure put microbenchmark lives in logstore_benchmark.zig and was not part of this run. A clone-path ingest rate (network + decode + put, NOT a pure put) is recorded per corpus under 'clone_ingest_proxy' and is clearly labeled as a proxy, not the harness put metric.",
    "per_frame_delta_vs_base_ratio": "NOT MEASURED (plan §4.3 second add). Not synthesized."
  },
  "corpora": [
    {
      "corpus": "fossil-scm-clone",
      "fossil_bench_name": "fossil",
      "tier": "medium",
      "source": "https://fossil-scm.org/home",
      "observed_trunk_hash": "61998ec8aa4f567cbb21f9ad3eeac11e8320184c1d3c822c5a4f3d82dcdaa3cd",
      "pinned": false,
      "artifacts_cloned": 67499,
      "zit": {
        "at_rest_bytes_total": 117528088,
        "frame_class_bytes": {
          "raw":    { "frames": 0,     "on_disk_bytes": 0,        "pct_store": 0.0 },
          "zlib":   { "frames": 9647,  "on_disk_bytes": 92073728, "pct_store": 78.3, "avg_bytes_per_frame": 9544 },
          "delta":  { "frames": 57852, "on_disk_bytes": 25454120, "pct_store": 21.7, "avg_bytes_per_frame": 439 },
          "config": { "frames": 2,     "on_disk_bytes": 176,      "pct_store": 0.0 }
        },
        "frame_header_overhead_bytes": 3711845,
        "frame_header_overhead_pct": 3.2,
        "accounting": "exact (header 64 + raw + zlib + delta + config == 117528088)",
        "artifact_type_bytes": {
          "checkin_manifest": { "count": 20848, "on_disk_bytes": 26721968, "pct_store": 22.7 },
          "other_artifact":   { "count": 6929,  "on_disk_bytes": 4835264,  "pct_store": 4.1 },
          "file_blob":        { "count": 39722, "on_disk_bytes": 85970616, "pct_store": 73.1 }
        },
        "full_form_compression_headroom": { "sampled_frames": 1024, "uncompressed": 2438684, "compressed": 1016538, "ratio_pct": 41.7 },
        "serve_cpu": { "artifacts": 67499, "total_ms": 532.40, "us_per_artifact": 7.888, "mb_per_s": 203.9 }
      },
      "fossil": {
        "at_rest_bytes_total": 72245248,
        "measure": "wc -c of fresh `fossil clone` destination (.fossil), same served corpus, no post-clone rebuild/vacuum",
        "snapshot_bytes_for_reference": 72146944
      },
      "ratio_zit_over_fossil": 1.627,
      "clone_ingest_proxy": {
        "note": "NOT the harness put metric — clone wall time / artifacts (network + decode + put). Labeled proxy only.",
        "zit_clone_wall_s": 53.96,
        "zit_us_per_artifact": 799.4,
        "fossil_clone_wall_s": 20.74
      }
    },
    {
      "corpus": "sqlite",
      "fossil_bench_name": "sqlite",
      "tier": "large",
      "source": "https://sqlite.org/src",
      "observed_trunk_hash": "1875249ab30fb110bc09963b592c8f48d2fb57066d770ad7e1da7e8bc8602977",
      "pinned": false,
      "artifacts_cloned": 130994,
      "zit": {
        "at_rest_bytes_total": 207344544,
        "frame_class_bytes": {
          "raw":    { "frames": 0,      "on_disk_bytes": 0,         "pct_store": 0.0 },
          "zlib":   { "frames": 10847,  "on_disk_bytes": 140422768, "pct_store": 67.7, "avg_bytes_per_frame": 12945 },
          "delta":  { "frames": 120147, "on_disk_bytes": 66921536,  "pct_store": 32.3, "avg_bytes_per_frame": 556 },
          "config": { "frames": 2,      "on_disk_bytes": 176,       "pct_store": 0.0 }
        },
        "frame_header_overhead_bytes": 7212808,
        "frame_header_overhead_pct": 3.5,
        "accounting": "exact (header 64 + raw + zlib + delta + config == 207344544)",
        "artifact_type_bytes": {
          "checkin_manifest": { "count": 36515, "on_disk_bytes": 81006048,  "pct_store": 39.1 },
          "other_artifact":   { "count": 4775,  "on_disk_bytes": 5531960,   "pct_store": 2.7 },
          "file_blob":        { "count": 89704, "on_disk_bytes": 120806296, "pct_store": 58.3 }
        },
        "full_form_compression_headroom": { "sampled_frames": 1024, "uncompressed": 11842512, "compressed": 3279252, "ratio_pct": 27.7 },
        "serve_cpu": { "artifacts": 130994, "total_ms": 1379.31, "us_per_artifact": 10.530, "mb_per_s": 138.4 }
      },
      "fossil": {
        "at_rest_bytes_total": 147709952,
        "measure": "wc -c of fresh `fossil clone` destination (.fossil), same served corpus, no post-clone rebuild/vacuum",
        "snapshot_bytes_for_reference": 147267584
      },
      "ratio_zit_over_fossil": 1.404,
      "clone_ingest_proxy": {
        "note": "NOT the harness put metric — clone wall time / artifacts (network + decode + put). Labeled proxy only.",
        "zit_clone_wall_s": 146.70,
        "zit_us_per_artifact": 1120.0,
        "fossil_clone_wall_s": 106.16
      }
    }
  ],
  "headline": {
    "note": "Baseline gap confirmed on both real corpora via the CLONE/SYNC ingest path (verbatim wire deltas at rest). Gap is smaller than the plan §1 anchor of 2.4x (that figure was on a different corpus/measure); this run measures 1.40x-1.63x on fossil-bench's fossil + sqlite corpora. This is the confirmed starting point step-2/3 deltas are measured against.",
    "fossil_scm_clone_ratio": 1.627,
    "sqlite_ratio": 1.404
  }
}