countingUsageAPI 实现 UsageSnapshotProvider,统计 reset 调用次数。
| 53 | |
| 54 | // countingUsageAPI 实现 UsageSnapshotProvider,统计 reset 调用次数。 |
| 55 | type countingUsageAPI struct { |
| 56 | resets atomic.Int32 |
| 57 | } |
| 58 | |
| 59 | func (c *countingUsageAPI) DoUsage(reset bool) coremanager.UsageStats { |
| 60 | if reset { |
nothing calls this directly
no outgoing calls
no test coverage detected