MCPcopy
hub / github.com/uber-go/zap / fakeSampler

Function fakeSampler

zapcore/sampler_test.go:40–45  ·  view source on GitHub ↗
(lvl LevelEnabler, tick time.Duration, first, thereafter int)

Source from the content-addressed store, hash-verified

38)
39
40func fakeSampler(lvl LevelEnabler, tick time.Duration, first, thereafter int) (Core, *observer.ObservedLogs) {
41 core, logs := observer.New(lvl)
42 // Keep using deprecated constructor for cc.
43 core = NewSampler(core, tick, first, thereafter)
44 return core, logs
45}
46
47func assertSequence(t testing.TB, logs []observer.LoggedEntry, lvl Level, seq ...int64) {
48 seen := make([]int64, len(logs))

Callers 6

TestSamplerFunction · 0.85
TestLevelOfSamplerFunction · 0.85
TestSamplerTickingFunction · 0.85
TestSamplerRacesFunction · 0.85
TestSamplerUnknownLevelsFunction · 0.85

Calls 2

NewFunction · 0.92
NewSamplerFunction · 0.85

Tested by

no test coverage detected