Skip to content

Commit

Permalink
number of files stat
Browse files Browse the repository at this point in the history
  • Loading branch information
kmulvey committed Sep 20, 2022
1 parent ce21a89 commit aae4923
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/app/imagedup/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
type stats struct {
PairTotal prometheus.Counter
GCTime prometheus.Gauge
TotalFiles prometheus.Gauge
TotalComparisons prometheus.Gauge
ImageCacheBytes prometheus.Gauge
ImageCacheNumImages prometheus.Gauge
Expand All @@ -38,6 +39,13 @@ func newStats(promNamespace string) *stats {
Help: "how many comparisons need to be done",
},
)
s.TotalFiles = prometheus.NewGauge(
prometheus.GaugeOpts{
Namespace: promNamespace,
Name: "total_files",
Help: "how many files we were give to compare",
},
)
s.PairTotal = prometheus.NewCounter(
prometheus.CounterOpts{
Namespace: promNamespace,
Expand Down Expand Up @@ -69,6 +77,7 @@ func newStats(promNamespace string) *stats {
prometheus.MustRegister(s.PairTotal)
prometheus.MustRegister(s.GCTime)
prometheus.MustRegister(s.TotalComparisons)
prometheus.MustRegister(s.TotalFiles)
prometheus.MustRegister(s.ImageCacheBytes)
prometheus.MustRegister(s.ImageCacheNumImages)
prometheus.MustRegister(s.FileMapBytes)
Expand Down

0 comments on commit aae4923

Please sign in to comment.