Skip to content

Add file ingestion histograms#14833

Closed
joshkang97 wants to merge 1 commit into
facebook:mainfrom
joshkang97:export-D107721260
Closed

Add file ingestion histograms#14833
joshkang97 wants to merge 1 commit into
facebook:mainfrom
joshkang97:export-D107721260

Conversation

@joshkang97

Copy link
Copy Markdown
Contributor

Summary:
Adds a public Statistics histogram, INGEST_EXTERNAL_FILE_TIME ("rocksdb.ingest.external.file.micros"), recording the end-to-end latency in microseconds of each IngestExternalFile(s) call. Ingestion timing was previously only available through per-thread perf_context counters, which require setting a PerfLevel and are not aggregated, so there was no process-wide latency distribution (p50/p99/max) for dashboards.

It is recorded with an RAII StopWatch at the top of DBImpl::IngestExternalFiles -- one sample per call (not per column family), covering all return paths. It is null-safe and self-gating on the stats level, so there is no cost when statistics are off, and ingestion is not a hot path. Java bindings are kept in sync per the statistics.h requirement; the C API needs no change.

Reviewed By: xingbowang

Differential Revision: D107721260

Summary:
Adds a public `Statistics` histogram, `INGEST_EXTERNAL_FILE_TIME` (`"rocksdb.ingest.external.file.micros"`), recording the end-to-end latency in microseconds of each `IngestExternalFile(s)` call. Ingestion timing was previously only available through per-thread `perf_context` counters, which require setting a `PerfLevel` and are not aggregated, so there was no process-wide latency distribution (p50/p99/max) for dashboards.

It is recorded with an RAII `StopWatch` at the top of `DBImpl::IngestExternalFiles` -- one sample per call (not per column family), covering all return paths. It is null-safe and self-gating on the stats level, so there is no cost when statistics are off, and ingestion is not a hot path. Java bindings are kept in sync per the `statistics.h` requirement; the C API needs no change.

Reviewed By: xingbowang

Differential Revision: D107721260
@meta-cla meta-cla Bot added the CLA Signed label Jun 8, 2026
@meta-codesync

meta-codesync Bot commented Jun 8, 2026

Copy link
Copy Markdown

@joshkang97 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D107721260.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

✅ clang-tidy: No findings on changed lines

Completed in 277.3s.

@joshkang97 joshkang97 closed this Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant