Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
Rename metric from .p50 to .median as we (internally) denylist .p50 s…
Browse files Browse the repository at this point in the history
…uffixes (#260)

Rename time to first bind metric from p50 to median
  • Loading branch information
Alexis-D authored Apr 12, 2023
1 parent 8e6d214 commit a7122ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const (
unboundMemoryReservations = "foundry.spark.scheduler.reservations.unbound.memory"
unboundNvidiaGPUReservations = "foundry.spark.scheduler.reservations.unbound.nvidiagpu"
timeToFirstBind = "foundry.spark.scheduler.reservations.timetofirstbind"
timeToFirstBindP50 = "foundry.spark.scheduler.reservations.timetofirstbind.p50"
timeToFirstBindMedian = "foundry.spark.scheduler.reservations.timetofirstbind.median"
timeToFirstBindMean = "foundry.spark.scheduler.reservations.timetofirstbind.mean"
softReservationCount = "foundry.spark.scheduler.softreservation.count"
softReservationExecutorCount = "foundry.spark.scheduler.softreservation.executorcount"
Expand Down Expand Up @@ -372,6 +372,6 @@ func IncrementSingleAzDynamicAllocationPackFailure(ctx context.Context, zone str
func ReportTimeToFirstBindMetrics(ctx context.Context, duration time.Duration) {
timeToFirstBindHist := metrics.FromContext(ctx).Histogram(timeToFirstBind)
timeToFirstBindHist.Update(duration.Nanoseconds())
metrics.FromContext(ctx).GaugeFloat64(timeToFirstBindP50).Update(timeToFirstBindHist.Percentile(.5))
metrics.FromContext(ctx).GaugeFloat64(timeToFirstBindMedian).Update(timeToFirstBindHist.Percentile(.5))
metrics.FromContext(ctx).GaugeFloat64(timeToFirstBindMean).Update(timeToFirstBindHist.Mean())
}

0 comments on commit a7122ad

Please sign in to comment.