Use perflib to gather metrics in the mssql collector
The perflib-based access code replaces WMI and is substantially more efficient and stable, leading to fewer collection timeouts in the mssql collector. Signed-off-by: Michael Allen <MAllen@laserfiche.com>
This commit is contained in:
parent
6bcaee5885
commit
24470eb17e
|
@ -58,6 +58,10 @@ var (
|
|||
|
||||
func registerCollector(name string, builder collectorBuilder, perfCounterNames ...string) {
|
||||
builders[name] = builder
|
||||
addPerfCounterDependencies(name, perfCounterNames)
|
||||
}
|
||||
|
||||
func addPerfCounterDependencies(name string, perfCounterNames []string) {
|
||||
perfIndicies := make([]string, 0, len(perfCounterNames))
|
||||
for _, cn := range perfCounterNames {
|
||||
perfIndicies = append(perfIndicies, MapCounterToIndex(cn))
|
||||
|
|
2713
collector/mssql.go
2713
collector/mssql.go
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue