mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-12 23:17:44 +00:00
more precision on measurement
This commit is contained in:
parent
9154ee8e7f
commit
bf2dff8497
3 changed files with 3 additions and 1 deletions
|
@ -25,6 +25,7 @@ func TestWatcherKeywordMatches(t *testing.T) {
|
|||
}
|
||||
|
||||
for scenario, tc := range tt {
|
||||
tc := tc
|
||||
t.Run(scenario, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
|
|
@ -369,6 +369,7 @@ func (rac *AuthenticatedClient) request(ctx context.Context, r *Request, errmap
|
|||
return rh(val), nil
|
||||
}
|
||||
|
||||
//nolint:unparam
|
||||
func (rac *AuthenticatedClient) logRequest() error {
|
||||
if rac.redditId == SkipRateLimiting {
|
||||
return nil
|
||||
|
|
|
@ -145,7 +145,7 @@ func (lac *liveActivitiesConsumer) Consume(delivery rmq.Delivery) {
|
|||
key := fmt.Sprintf("locks:live-activities:%s", at)
|
||||
|
||||
// Measure queue latency
|
||||
ttl := lac.redis.TTL(lac, key).Val()
|
||||
ttl := lac.redis.PTTL(lac, key).Val()
|
||||
age := (domain.NotificationCheckTimeout - ttl)
|
||||
_ = lac.statsd.Histogram("apollo.dequeue.latency", float64(age.Milliseconds()), []string{"queue:live_activities"}, 0.1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue