MCPcopy Index your code
hub / github.com/coder/coder / EngineSnapLen

Function EngineSnapLen

agent/filefinder/export_test.go:44–50  ·  view source on GitHub ↗

EngineSnapLen returns the number of root snapshots currently held by the engine, or -1 if the pointer is nil.

(eng *Engine)

Source from the content-addressed store, hash-verified

42// EngineSnapLen returns the number of root snapshots currently held
43// by the engine, or -1 if the pointer is nil.
44func EngineSnapLen(eng *Engine) int {
45 p := eng.snap.Load()
46 if p == nil {
47 return -1
48 }
49 return len(*p)
50}
51
52// DefaultScoreParamsForTest exposes defaultScoreParams for tests.
53var DefaultScoreParamsForTest = defaultScoreParams

Callers 1

Calls 1

LoadMethod · 0.45

Tested by

no test coverage detected