MCPcopy Create free account
hub / github.com/coder/coder / newTimingAggregator

Function newTimingAggregator

provisioner/terraform/timings.go:97–102  ·  view source on GitHub ↗

newTimingAggregator creates a new aggregator which measures the duration of resource init/plan/apply actions; stage represents the stage of provisioning the timings are occurring within.

(stage database.ProvisionerJobTimingStage)

Source from the content-addressed store, hash-verified

95// newTimingAggregator creates a new aggregator which measures the duration of resource init/plan/apply actions; stage
96// represents the stage of provisioning the timings are occurring within.
97func newTimingAggregator(stage database.ProvisionerJobTimingStage) *timingAggregator {
98 return &timingAggregator{
99 stage: stage,
100 stateLookup: make(map[uint64]*timingSpan),
101 }
102}
103
104// ingest accepts a timing span at a certain timestamp and assigns it a state according to the kind of timing event.
105// We memoize start & completion events, and then calculate their total duration in aggregate.

Callers 2

executorMethod · 0.85
TestAggregationFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestAggregationFunction · 0.68