Skip to content

Commit

Permalink
Merge pull request #592 from mallenLF/mssql-perflib
Browse files Browse the repository at this point in the history
Use perflib to gather metrics in the mssql collector
  • Loading branch information
carlpett authored Sep 7, 2020
2 parents 6bcaee5 + a3867b8 commit 922c08b
Show file tree
Hide file tree
Showing 2 changed files with 1,321 additions and 1,305 deletions.
4 changes: 4 additions & 0 deletions collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Loading

0 comments on commit 922c08b

Please sign in to comment.