Skip to content

Commit

Permalink
vfs: merge fuse ops metrics in .stats (#4560)
Browse files Browse the repository at this point in the history
  • Loading branch information
SandyXSD authored Mar 22, 2024
1 parent f2c5961 commit a0d24c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/vfs/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ func collectMetrics(registry *prometheus.Registry) []byte {
}
for _, mf := range mfs {
var name = *mf.Name
if name == "juicefs_meta_ops_durations_histogram_seconds" && *mf.Type == io_prometheus_client.MetricType_HISTOGRAM {
if (name == "juicefs_meta_ops_durations_histogram_seconds" || name == "juicefs_fuse_ops_durations_histogram_seconds") &&
*mf.Type == io_prometheus_client.MetricType_HISTOGRAM {
total, sum := mergeHistogramMetrics(mf)
_, _ = fmt.Fprintf(w, "%s_total %d\n", name, total)
_, _ = fmt.Fprintf(w, "%s_sum %s\n", name, format(sum))
Expand Down

0 comments on commit a0d24c8

Please sign in to comment.