feat: slow threshold customizable in zrpc (#1191)
* feat: slow threshold customizable in rest * feat: slow threshold customizable in rest * feat: slow threshold customizable in rest * feat: slow threshold customizable in zrpc
This commit is contained in:
@@ -13,6 +13,12 @@ import (
|
||||
"google.golang.org/grpc/peer"
|
||||
)
|
||||
|
||||
func TestSetSlowThreshold(t *testing.T) {
|
||||
assert.Equal(t, defaultSlowThreshold, slowThreshold.Load())
|
||||
SetSlowThreshold(time.Second)
|
||||
assert.Equal(t, time.Second, slowThreshold.Load())
|
||||
}
|
||||
|
||||
func TestUnaryStatInterceptor(t *testing.T) {
|
||||
metrics := stat.NewMetrics("mock")
|
||||
interceptor := UnaryStatInterceptor(metrics)
|
||||
|
||||
Reference in New Issue
Block a user