Skip to content

Use UTC time instead of local time for average-queue-time metric

Rohit Kothur requested to merge rkothur/buildgrid:fix-queue-offset into master

Description

The average-queue-time metric was outputting large negative numbers on my end because grpc's GetCurrentTime() uses UTC time while datetime.now() uses local time.

Other duration metrics compare two grpc timestamps, so they're ok.

Changes proposed in this merge request:

  • Use datetime.utcnow() to avoid the timezone drift.
Edited by Rohit Kothur

Merge request reports