Skip to content

Commit

Permalink
Merge pull request #3548 from microyahoo/metric
Browse files Browse the repository at this point in the history
metrics: use milliseconds instead of microseconds as the time unit for scheduling latency
  • Loading branch information
volcano-sh-bot authored Aug 7, 2024
2 parents 5140644 + 2b9b3dd commit ab23490
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions pkg/scheduler/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var (
Subsystem: VolcanoNamespace,
Name: "e2e_scheduling_latency_milliseconds",
Help: "E2e scheduling latency in milliseconds (scheduling algorithm + binding)",
Buckets: prometheus.ExponentialBuckets(5, 2, 10),
Buckets: prometheus.ExponentialBuckets(5, 2, 15),
},
)

Expand Down Expand Up @@ -83,18 +83,18 @@ var (
pluginSchedulingLatency = promauto.NewHistogramVec(
prometheus.HistogramOpts{
Subsystem: VolcanoNamespace,
Name: "plugin_scheduling_latency_microseconds",
Help: "Plugin scheduling latency in microseconds",
Buckets: prometheus.ExponentialBuckets(5, 2, 10),
Name: "plugin_scheduling_latency_milliseconds",
Help: "Plugin scheduling latency in milliseconds",
Buckets: prometheus.ExponentialBuckets(5, 2, 15),
}, []string{"plugin", "OnSession"},
)

actionSchedulingLatency = promauto.NewHistogramVec(
prometheus.HistogramOpts{
Subsystem: VolcanoNamespace,
Name: "action_scheduling_latency_microseconds",
Help: "Action scheduling latency in microseconds",
Buckets: prometheus.ExponentialBuckets(5, 2, 10),
Name: "action_scheduling_latency_milliseconds",
Help: "Action scheduling latency in milliseconds",
Buckets: prometheus.ExponentialBuckets(5, 2, 15),
}, []string{"action"},
)

Expand All @@ -103,7 +103,7 @@ var (
Subsystem: VolcanoNamespace,
Name: "task_scheduling_latency_milliseconds",
Help: "Task scheduling latency in milliseconds",
Buckets: prometheus.ExponentialBuckets(5, 2, 10),
Buckets: prometheus.ExponentialBuckets(5, 2, 15),
},
)

Expand Down Expand Up @@ -150,12 +150,12 @@ var (

// UpdatePluginDuration updates latency for every plugin
func UpdatePluginDuration(pluginName, onSessionStatus string, duration time.Duration) {
pluginSchedulingLatency.WithLabelValues(pluginName, onSessionStatus).Observe(DurationInMicroseconds(duration))
pluginSchedulingLatency.WithLabelValues(pluginName, onSessionStatus).Observe(DurationInMilliseconds(duration))
}

// UpdateActionDuration updates latency for every action
func UpdateActionDuration(actionName string, duration time.Duration) {
actionSchedulingLatency.WithLabelValues(actionName).Observe(DurationInMicroseconds(duration))
actionSchedulingLatency.WithLabelValues(actionName).Observe(DurationInMilliseconds(duration))
}

// UpdateE2eDuration updates entire end to end scheduling latency
Expand Down

0 comments on commit ab23490

Please sign in to comment.