Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmiskiewicz committed Nov 14, 2024
1 parent 4d4a47f commit 91faab0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions cmd/broker/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"fmt"
"io"
"net/http"
"testing"
"time"
Expand Down Expand Up @@ -214,8 +213,8 @@ func TestMetrics(t *testing.T) {
suite.AssertMetrics2(1, *op11)

//uncomment to see the output of the metric endpoint
resp := suite.CallAPI("GET", "/metrics", "")
r, _ := io.ReadAll(resp.Body)
fmt.Printf("%s", r)
//resp := suite.CallAPI("GET", "/metrics", "")
//r, _ := io.ReadAll(resp.Body)
//fmt.Printf("%s", r)
})
}
2 changes: 1 addition & 1 deletion internal/metricsv2/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (c *BindDurationCollector) OnBindingExecuted(ctx context.Context, ev interf

func (c *BindDurationCollector) OnUnbindingExecuted(ctx context.Context, ev interface{}) error {
obj := ev.(broker.UnbindRequestProcessed)
c.unbindHistorgam.WithLabelValues().Observe(float64(obj.ProcessingDuration.Milliseconds()))
c.unbindHistogram.WithLabelValues().Observe(float64(obj.ProcessingDuration.Milliseconds()))
return nil
}

Expand Down

0 comments on commit 91faab0

Please sign in to comment.