Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Upgrade Client go and implement new methods (#25)
Browse files Browse the repository at this point in the history
* Upgrade Client go and implement new methods
  • Loading branch information
anandswaminathan authored Jul 1, 2019
1 parent a06e54f commit 1b5ef79
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 16 deletions.
28 changes: 14 additions & 14 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@

[[constraint]]
name = "k8s.io/apimachinery"
version = "kubernetes-1.11.2"
version = "kubernetes-1.13.1"

[[constraint]]
name = "k8s.io/client-go"
version = "kubernetes-1.11.2"
version = "kubernetes-1.13.1"

[[constraint]]
name = "github.com/graymeta/stow"
Expand Down
20 changes: 20 additions & 0 deletions promutils/workqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@ func init() {

type prometheusMetricsProvider struct{}

func (prometheusMetricsProvider) NewUnfinishedWorkSecondsMetric(name string) workqueue.SettableGaugeMetric {
unfinishedWork := prometheus.NewGauge(prometheus.GaugeOpts{
Subsystem: name,
Name: "unfinished_work_s",
Help: "How many seconds of work in progress in workqueue: " + name,
})
prometheus.MustRegister(unfinishedWork)
return unfinishedWork
}

func (prometheusMetricsProvider) NewLongestRunningProcessorMicrosecondsMetric(name string) workqueue.SettableGaugeMetric {
unfinishedWork := prometheus.NewGauge(prometheus.GaugeOpts{
Subsystem: name,
Name: "longest_running_processor_us",
Help: "How many microseconds longest running processor from workqueue" + name + " takes.",
})
prometheus.MustRegister(unfinishedWork)
return unfinishedWork
}

func (prometheusMetricsProvider) NewDepthMetric(name string) workqueue.GaugeMetric {
depth := prometheus.NewGauge(prometheus.GaugeOpts{
Subsystem: name,
Expand Down

0 comments on commit 1b5ef79

Please sign in to comment.