Updates stats that are more efficient to calculate at stats collection time
(ctx context.Context)
| 1862 | |
| 1863 | // Updates stats that are more efficient to calculate at stats collection time |
| 1864 | func (sc *ServerContext) updateCalculatedStats(ctx context.Context) { |
| 1865 | sc._databasesLock.RLock() |
| 1866 | defer sc._databasesLock.RUnlock() |
| 1867 | for _, dbContext := range sc._databases { |
| 1868 | dbState := atomic.LoadUint32(&dbContext.State) |
| 1869 | if dbState == db.DBOnline { |
| 1870 | dbContext.UpdateCalculatedStats(ctx) |
| 1871 | } |
| 1872 | } |
| 1873 | |
| 1874 | } |
| 1875 | |
| 1876 | // initializeGoCBAgent Obtains a gocb agent from the current server connection. Requires the agent to be closed after use. |
| 1877 | // Uses retry loop |
no test coverage detected