Class BowireBenchmarkTimeline
- Namespace
- Kuestenlogik.Bowire.Benchmarking
- Assembly
- Kuestenlogik.Bowire.Benchmarking.dll
#623 — the shape of a run: its calls in time order, bucketed over its wall clock. A run that is uniformly flaky and one that collapsed halfway report the same error rate in total; here they look different.
The number of buckets follows the run's size, not a fixed interval: about the square root of the call count, at least 4 and at most 40, so a short run is not a row of empty slices and a long one is not a single smear. The rail's sparkline uses the same rule.
public sealed class BowireBenchmarkTimeline
- Inheritance
-
BowireBenchmarkTimeline
- Inherited Members
Fields
MaxBuckets
The most buckets a run is split into.
public const int MaxBuckets = 40
Field Value
MinBuckets
The fewest buckets a run with enough calls is split into.
public const int MinBuckets = 4
Field Value
Properties
BucketMs
How long each bucket is, in milliseconds.
public double BucketMs { get; }
Property Value
Buckets
The buckets, in time order.
public IReadOnlyList<BowireTimelineBucket> Buckets { get; }
Property Value
Methods
Bounds(BowireRunWindow, double)
The part of a run of elapsedMs a window covers, as start and end offsets.
public static (double StartMs, double EndMs) Bounds(BowireRunWindow window, double elapsedMs)
Parameters
windowBowireRunWindowelapsedMsdouble
Returns
BucketCount(int)
How many buckets a run of calls calls is split into.
public static int BucketCount(int calls)
Parameters
callsint
Returns
From(IReadOnlyList<BowireBenchmarkSample>, double)
Bucket samples over a run of elapsedMs.
A sample at or past the end falls into the last bucket.
public static BowireBenchmarkTimeline From(IReadOnlyList<BowireBenchmarkSample> samples, double elapsedMs)
Parameters
samplesIReadOnlyList<BowireBenchmarkSample>elapsedMsdouble
Returns
TrySplitWindow(string, out string, out BowireRunWindow)
Split a trailing window suffix (-last-quarter, _last_half …) off a threshold's metric.
public static bool TrySplitWindow(string metric, out string rest, out BowireRunWindow window)
Parameters
metricstringreststringwindowBowireRunWindow
Returns
WindowSuffix(BowireRunWindow)
The suffix a threshold names a window with: -last-quarter; empty for the whole run.
public static string WindowSuffix(BowireRunWindow window)
Parameters
windowBowireRunWindow