tiny.bench
Overview · API · Code relationships · Verification · Audit
Overview
A microbenchmark result moves with heap and stack layout, with the cache state the run starts in, and with the resolution of the clock that times it. Running the benchmark again as its own child process a set number of times tells variance coming from the environment apart from variance coming from the program itself. Each repetition is a multi-process trial. One timed run of the batched benchmark body, recorded as nanoseconds per evaluation, is a sample. Geometric batching bounds what timing quantization can do to the result by growing the evaluations inside one sample by a factor between two and ten, until a sample spans a thousand times the clock resolution.
Resampling the collected samples gives a range for the median and for the other reported statistics, called a bootstrap confidence interval. Those intervals leave systematic shifts, correlation between neighboring samples, and coverage errors uncorrected. Every later statistics run takes its regions out of storage, the analysis scratch. The caller sizes the analysis scratch and hands it over once, so computing statistics takes nothing further from an allocator. The workload under measurement can still move memory of its own.
Definitions
Actions
Public operations.
saturatingU64readInstantsampleSetValueCapacitywriteStdoutDocPhasecomputeSampleStatsWithBootstraprealNowNsvaluePerFloatUnitvaluePerUnitwriteBenchmarkEvidencewriteBootstrapConfidenceIntervalswriteProfilingReportwriteStderrFmtwriteStdoutFmtIndexedDeltaTotalsIndexedMemoryTotalscallWithStackPadcurrentBuildMetadatarerandomizeLayoutsaturatingI64timetouchStackPadwriteBuildMetadatawritePerfCounterResultwriteRunEndwriteSampleEventwriteStderrDocphaseAtprobeClockwriteRunStartelapsedNsBetweennowInstantsampleSetscomputeSampleStatsnsOrZeronsPerFloatUnitnsPerUnitsectionstderrstdoutwriteSampledResultFieldsnowNselapsedNs
Types and contracts
Public types and contracts.
CozSessionAllocationAttributionAllocationCounts: Records the allocation traffic and the outstanding-byte high water of one counted allocator.AutomaticEvaluationAutomaticSelectionBenchFnBootstrapConfidenceIntervalsBootstrapConfigBuildMetadataCapabilityCapabilityNameCapabilityStateClockProbeComparisonCapacityComparisonCapacityErrorComparisonErrorComparisonLimitsComparisonStorageComparisonStorageExhaustionComparisonStorageStatusConfidenceIntervalConfigEvaluationEvaluationSelectionJsonlOptionsProfilingReportProfilingSessionOptionsResultRunEndRunOptionsRunStartSampleStatsStatisticsCapacityStatisticsCapacityErrorStatisticsLimitsStatisticsStorageStatisticsStorageExhaustionStatisticsStorageStatusTeardownFnProfilingSessionCountingAllocatorSuiteSampleSetCursor
Namespaces
Public namespaces.
Values and defaults
Public values and defaults.
Code relationships
Direct static dependencies extracted from parsed source by semantic graph analysis.
Uses: tiny.coz, tiny.hypothesis, tiny.memtrace, tiny.profiling, tiny.stabilizer, tiny.sys, tiny.trace, tiny.tracy
Used by: tiny.accy, tiny.bumpalo, tiny.chant, tiny.choir, tiny.css, tiny.deflate, tiny.filigree, tiny.geometry, tiny.glom, tiny.gpalloc, tiny.gui, tiny.http, tiny.hypothesis, tiny.isa, tiny.machine, tiny.markdown, tiny.memtrace, tiny.mprompt, tiny.pluck, tiny.png, tiny.profiling, tiny.python, tiny.sandbox, tiny.sdfii, tiny.simd, tiny.smg, tiny.smt, tiny.sql, tiny.sys, tiny.tldr, tiny.trace, tiny.ui, tiny.windowing, tiny.zen
Verification
No verification records are cataloged for this module in this build.
Audit
| Evidence | Value |
|---|---|
| Source | lib/bench/src/root.zig |
| Definitions | 1 of 98 documented |
| Members | 0 of 0 documented |
| Public names | 98 API, 289 indexed |
| Version | 26.7.0 |
| Revision | daab053ee433 |
| Unresolved targets | 1 |