{
  "version": 1,
  "generated": "2026-08-28T05:00:22.543Z",
  "note": "Raw sessions under sessions/ are the ground truth; these tables are derived and rebuilt daily.",
  "license": {
    "id": "CC-BY-4.0",
    "name": "Creative Commons Attribution 4.0 International",
    "url": "https://creativecommons.org/licenses/by/4.0/legalcode",
    "attribution": "cratebank contributors, cratebank public build dataset, https://cratebank.io/"
  },
  "phases": [
    "parse",
    "macro_expand",
    "resolve",
    "ast_lowering",
    "type_check",
    "coherence",
    "analysis",
    "lint",
    "mir_build",
    "borrowck",
    "monomorphize",
    "metadata_encode",
    "codegen",
    "blocked",
    "unattributed"
  ],
  "tables": {
    "sessions.parquet": {
      "grain": "one row per build",
      "source": "the client's own report of the build it measured",
      "columns": {
        "run_id": {
          "type": "string",
          "doc": "session id"
        },
        "client": {
          "type": "string",
          "doc": "cargo-cratebank version"
        },
        "schema": {
          "type": "int64",
          "doc": "payload schema version"
        },
        "timestamp": {
          "type": "string",
          "doc": "build start, RFC3339"
        },
        "rustc_version": {
          "type": "string",
          "doc": ""
        },
        "rustc_host": {
          "type": "string",
          "doc": "compiler host triple"
        },
        "profile": {
          "type": "string",
          "doc": "dev | release"
        },
        "jobs": {
          "type": "int64",
          "doc": "-j value"
        },
        "ci": {
          "type": "boolean",
          "doc": "CI env var was set"
        },
        "complete": {
          "type": "boolean",
          "doc": "the sampled build succeeded"
        },
        "units": {
          "type": "int64",
          "doc": ""
        },
        "units_withheld": {
          "type": "int64",
          "doc": "private units omitted; the graph is partial"
        },
        "sections": {
          "type": "int64",
          "doc": ""
        },
        "artifacts": {
          "type": "int64",
          "doc": "compiler-output files retained"
        },
        "artifact_bytes": {
          "type": "int64",
          "doc": "total retained compiler-output bytes"
        },
        "repository": {
          "type": "string",
          "doc": "repository URL for an explicitly public workspace, when declared"
        },
        "machine_id": {
          "type": "string",
          "doc": "self-declared machine or role label, such as ci or laptop"
        },
        "org_id": {
          "type": "string",
          "doc": "optional self-declared organization label; null by default"
        },
        "os": {
          "type": "string",
          "doc": ""
        },
        "arch": {
          "type": "string",
          "doc": ""
        },
        "cpu_model": {
          "type": "string",
          "doc": ""
        },
        "cpu_cores": {
          "type": "int64",
          "doc": ""
        },
        "mem_gb": {
          "type": "int64",
          "doc": ""
        },
        "os_version": {
          "type": "string",
          "doc": ""
        },
        "kernel": {
          "type": "string",
          "doc": ""
        },
        "virt": {
          "type": "string",
          "doc": "virtualization hint"
        },
        "cargo_version": {
          "type": "string",
          "doc": ""
        },
        "loadavg_mean": {
          "type": "double",
          "doc": "machine load during the build"
        },
        "loadavg_max": {
          "type": "double",
          "doc": ""
        },
        "cpu_busy_mean": {
          "type": "double",
          "doc": "percent"
        },
        "cpu_busy_max": {
          "type": "double",
          "doc": "percent"
        },
        "load_samples": {
          "type": "int64",
          "doc": ""
        },
        "stall_cpu_s": {
          "type": "double",
          "doc": "Linux pressure-stall delta in seconds"
        },
        "stall_io_s": {
          "type": "double",
          "doc": "Linux pressure-stall delta in seconds"
        },
        "stall_memory_s": {
          "type": "double",
          "doc": "Linux pressure-stall delta in seconds"
        },
        "elapsed_s": {
          "type": "double",
          "doc": "end-to-end wall seconds through Cargo build-finished"
        },
        "tree_peak_rss_bytes": {
          "type": "int64",
          "doc": "largest sampled concurrent RSS sum for Cargo descendants plus profiled rustc processes"
        },
        "rss_samples": {
          "type": "int64",
          "doc": "number of 50ms process-tree samples"
        },
        "target_dir_state": {
          "type": "string",
          "doc": "missing | empty | populated before the build"
        },
        "cargo_cache_state": {
          "type": "string",
          "doc": "no_artifacts | rebuilt | fully_fresh | mixed"
        },
        "cargo_fresh_units": {
          "type": "int64",
          "doc": "whole-build compiler-artifact messages Cargo marked fresh"
        },
        "cargo_rebuilt_units": {
          "type": "int64",
          "doc": "whole-build compiler-artifact messages Cargo rebuilt"
        },
        "compiler_cache": {
          "type": "string",
          "doc": "configured compiler-wrapper basename, when any"
        },
        "compiler_cache_requests": {
          "type": "int64",
          "doc": "sccache request delta, when sccache is configured"
        },
        "compiler_cache_hits": {
          "type": "int64",
          "doc": "sccache hit delta"
        },
        "compiler_cache_misses": {
          "type": "int64",
          "doc": "sccache miss delta"
        },
        "compiler_cache_errors": {
          "type": "int64",
          "doc": "sccache error delta"
        }
      }
    },
    "units.parquet": {
      "grain": "one row per compilation unit",
      "source": "cargo build --timings",
      "columns": {
        "run_id": {
          "type": "string",
          "doc": "session id; joins to sessions.parquet"
        },
        "index": {
          "type": "int64",
          "doc": "cargo unit index within the session"
        },
        "package": {
          "type": "string",
          "doc": "package name reported by Cargo"
        },
        "mode": {
          "type": "string",
          "doc": "Cargo compilation mode"
        },
        "version": {
          "type": "string",
          "doc": "package version"
        },
        "target": {
          "type": "string",
          "doc": "target label, including build-script when applicable"
        },
        "features": {
          "type": "string",
          "doc": "resolved feature names, comma-separated"
        },
        "duration": {
          "type": "double",
          "doc": "wall seconds"
        },
        "started": {
          "type": "double",
          "doc": "seconds since build start (timestamp, not a duration)"
        },
        "finished": {
          "type": "double",
          "doc": "seconds since build start"
        },
        "frontend": {
          "type": "double",
          "doc": "frontend wall seconds from Cargo timings"
        },
        "codegen": {
          "type": "double",
          "doc": "codegen wall seconds from Cargo timings"
        },
        "link": {
          "type": "double",
          "doc": "link wall seconds from Cargo timings"
        },
        "unblocked": {
          "type": "int64",
          "doc": "count of units this one released"
        }
      }
    },
    "phases.parquet": {
      "grain": "one row per unit per thread-class per phase",
      "source": "sampling profiler around the whole build",
      "columns": {
        "run_id": {
          "type": "string",
          "doc": "joins to sessions.parquet"
        },
        "unit_key": {
          "type": "string",
          "doc": "joins to compiler_units within run_id"
        },
        "crate": {
          "type": "string",
          "doc": "rustc crate name; build scripts are all named build_script_build"
        },
        "package": {
          "type": "string",
          "doc": "Cargo package this unit belongs to; joins to units.package within run_id"
        },
        "version": {
          "type": "string",
          "doc": "package version, null when the unit is not a registry package"
        },
        "crate_type": {
          "type": "string",
          "doc": ""
        },
        "thread": {
          "type": "string",
          "doc": "serial (main rustc) | parallel (per-codegen-unit threads); do not sum them into one number"
        },
        "phase": {
          "type": "string",
          "doc": ""
        },
        "samples": {
          "type": "int64",
          "doc": "sample count, not seconds"
        },
        "wall_s": {
          "type": "double",
          "doc": "wall seconds for the whole unit, from the profiler"
        },
        "rate_hz": {
          "type": "int64",
          "doc": "sampling rate, needed to turn samples into seconds"
        },
        "sampler": {
          "type": "string",
          "doc": "which profiler produced this"
        }
      },
      "caution": "CPU-weighted sample counts, not wall time. Not comparable to units.parquet's frontend/codegen, which are wall boundaries."
    },
    "timeline.parquet": {
      "grain": "one row per timeline sample",
      "source": "cargo build --timings",
      "columns": {
        "run_id": {
          "type": "string",
          "doc": "joins to sessions.parquet"
        },
        "t": {
          "type": "double",
          "doc": "seconds since build start"
        },
        "active": {
          "type": "int64",
          "doc": "units compiling"
        },
        "waiting": {
          "type": "int64",
          "doc": "units ready but blocked on a dependency -- the reason this table exists; high waiting means dependency-bound, not slow"
        },
        "inactive": {
          "type": "int64",
          "doc": "units not yet runnable"
        },
        "cpu_pct": {
          "type": "double",
          "doc": "whole-machine CPU percent"
        }
      },
      "caution": "cargo samples concurrency and CPU on different clocks, so a row carries the concurrency triple OR cpu_pct, never both. Filter on the column you want being non-null."
    },
    "unit_flags.parquet": {
      "grain": "one row per unit per compilation setting",
      "source": "the rustc command line, from the profile",
      "columns": {
        "run_id": {
          "type": "string",
          "doc": "joins to sessions.parquet"
        },
        "unit_key": {
          "type": "string",
          "doc": "joins to compiler_units within run_id"
        },
        "crate": {
          "type": "string",
          "doc": "rustc crate name; build scripts are all named build_script_build"
        },
        "package": {
          "type": "string",
          "doc": "Cargo package name; joins to units.package within run_id"
        },
        "version": {
          "type": "string",
          "doc": "package version, null when the unit is not a registry package"
        },
        "crate_type": {
          "type": "string",
          "doc": ""
        },
        "flag": {
          "type": "string",
          "doc": "opt-level | debuginfo | codegen-units | panic | lto | edition | target | features | incremental | ..."
        },
        "value": {
          "type": "string",
          "doc": "always a string; features is comma-separated"
        }
      },
      "caution": "paths are deliberately absent -- every one would name the builder's machine. A custom target is recorded by the name of its spec rather than the path it was read from, and `incremental` is true/false only, for the same reason, though its presence shifts every timing in the session."
    },
    "artifacts.parquet": {
      "grain": "one row per compiler-output file for a public compilation unit",
      "source": "Cargo compiler-artifact messages plus local file metadata",
      "columns": {
        "run_id": {
          "type": "string",
          "doc": "joins to sessions.parquet"
        },
        "unit_index": {
          "type": "int64",
          "doc": "joins to units.index within run_id; null when a fresh unit had no timing row"
        },
        "package": {
          "type": "string",
          "doc": "Cargo package name"
        },
        "version": {
          "type": "string",
          "doc": "Cargo package version"
        },
        "target": {
          "type": "string",
          "doc": "Cargo target name"
        },
        "target_kind": {
          "type": "string",
          "doc": "Cargo target kinds, comma-separated"
        },
        "crate_types": {
          "type": "string",
          "doc": "rustc crate types, comma-separated"
        },
        "output": {
          "type": "string",
          "doc": "path-free output kind"
        },
        "bytes": {
          "type": "int64",
          "doc": "file size in bytes"
        },
        "fresh": {
          "type": "boolean",
          "doc": "Cargo reported that the artifact was reused rather than rebuilt"
        }
      },
      "caution": "filesystem paths and filenames are not uploaded; output is a path-free kind such as rlib, rmeta, executable, or build-script."
    },
    "edges.parquet": {
      "grain": "one dependency-unblocking edge within a build",
      "source": "cargo build --timings",
      "columns": {
        "run_id": {
          "type": "string",
          "doc": "joins to sessions.parquet"
        },
        "blocker_unit_index": {
          "type": "int64",
          "doc": "unit whose completion released another unit"
        },
        "unblocked_unit_index": {
          "type": "int64",
          "doc": "released unit; joins to units.index within run_id"
        },
        "kind": {
          "type": "string",
          "doc": "full | metadata"
        }
      },
      "caution": "edges involving withheld private units are absent, so a build graph can be partial."
    },
    "compiler_units.parquet": {
      "grain": "one public rustc process observed by samply",
      "source": "samply plus external process-tree RSS sampling",
      "columns": {
        "run_id": {
          "type": "string",
          "doc": "joins to sessions.parquet"
        },
        "unit_key": {
          "type": "string",
          "doc": "path-free rustc metadata key; joins to phases and unit_flags within run_id"
        },
        "crate": {
          "type": "string",
          "doc": "rustc crate name; build scripts are all named build_script_build"
        },
        "package": {
          "type": "string",
          "doc": "Cargo package name; joins to units.package within run_id"
        },
        "version": {
          "type": "string",
          "doc": "package version, null when the unit is not a registry package"
        },
        "crate_type": {
          "type": "string",
          "doc": ""
        },
        "wall_s": {
          "type": "double",
          "doc": "rustc process wall seconds from samply"
        },
        "peak_rss_bytes": {
          "type": "int64",
          "doc": "largest RSS sample observed for the rustc process"
        }
      },
      "caution": "RSS is sampled every 50ms and is an observed peak, not an allocator measurement. Very short processes can have null RSS."
    },
    "build_config.parquet": {
      "grain": "one sanitized session-level build setting",
      "source": "allowlisted environment variables and Cargo configuration",
      "columns": {
        "run_id": {
          "type": "string",
          "doc": "joins to sessions.parquet"
        },
        "source": {
          "type": "string",
          "doc": "env | config"
        },
        "setting": {
          "type": "string",
          "doc": "allowlisted variable or Cargo build key"
        },
        "value": {
          "type": "string",
          "doc": "sanitized string or JSON array"
        }
      },
      "caution": "paths are removed or reduced to program basenames before upload."
    }
  }
}