MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / UpdateTotalSyncTimeStat

Method UpdateTotalSyncTimeStat

db/database_stats.go:40–43  ·  view source on GitHub ↗

UpdateTotalSyncTimeStat updates the TotalSyncTime to the current value + NumReplicationsActive each time this is called

()

Source from the content-addressed store, hash-verified

38
39// UpdateTotalSyncTimeStat updates the TotalSyncTime to the current value + NumReplicationsActive each time this is called
40func (db *DatabaseContext) UpdateTotalSyncTimeStat() {
41 currentActiveReplications := db.DbStats.DatabaseStats.NumReplicationsActive.Value()
42 db.DbStats.DatabaseStats.TotalSyncTime.Add(currentActiveReplications)
43}

Callers 1

StartOnlineProcessesMethod · 0.95

Calls 2

ValueMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected