mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Implement binned counts for polling metrics
This commit is contained in:
parent
83ef0b6f6d
commit
92bd900bc5
4 changed files with 108 additions and 23 deletions
|
@ -26,8 +26,6 @@ var promOnce sync.Once
|
|||
|
||||
func TestBroker(t *testing.T) {
|
||||
|
||||
promOnce.Do(InitPrometheus)
|
||||
|
||||
Convey("Context", t, func() {
|
||||
ctx := NewBrokerContext(NullLogger())
|
||||
|
||||
|
@ -303,8 +301,6 @@ func TestBroker(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestSnowflakeHeap(t *testing.T) {
|
||||
promOnce.Do(InitPrometheus)
|
||||
|
||||
Convey("SnowflakeHeap", t, func() {
|
||||
h := new(SnowflakeHeap)
|
||||
heap.Init(h)
|
||||
|
@ -348,8 +344,6 @@ func TestSnowflakeHeap(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestGeoip(t *testing.T) {
|
||||
promOnce.Do(InitPrometheus)
|
||||
|
||||
Convey("Geoip", t, func() {
|
||||
tv4 := new(GeoIPv4Table)
|
||||
err := GeoIPLoadFile(tv4, "test_geoip")
|
||||
|
@ -454,8 +448,6 @@ func TestGeoip(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestMetrics(t *testing.T) {
|
||||
promOnce.Do(InitPrometheus)
|
||||
|
||||
Convey("Test metrics...", t, func() {
|
||||
done := make(chan bool)
|
||||
buf := new(bytes.Buffer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue