Skip to content

Commit

Permalink
feat: use microseconds for measuring pool checkouts (#493)
Browse files Browse the repository at this point in the history
Change time unit used for measures to microsecond so all measurements
are multiplied by factor of `1000` which should give us better insights
into real distribution.
  • Loading branch information
hauleth authored Nov 28, 2024
1 parent e80c9a2 commit 1ef379a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/supavisor/monitoring/tenant.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ defmodule Supavisor.PromEx.Plugins.Tenant do
:supavisor_tenant_client_event_metrics,
[
distribution(
[:supavisor, :pool, :checkout, :duration, :local],
[:supavisor, :pool, :checkout, :duration, :local, :us],
event_name: [:supavisor, :pool, :checkout, :stop, :local],
measurement: :duration,
description: "Duration of the checkout local process in the tenant db pool.",
tags: @tags,
unit: {:native, :millisecond},
unit: {:native, :microsecond},
reporter_options: [
peep_bucket_calculator: Buckets
]
),
distribution(
[:supavisor, :pool, :checkout, :duration, :remote],
[:supavisor, :pool, :checkout, :duration, :remote, :us],
event_name: [:supavisor, :pool, :checkout, :stop, :remote],
measurement: :duration,
description: "Duration of the checkout remote process in the tenant db pool.",
tags: @tags,
unit: {:native, :millisecond},
unit: {:native, :microsecond},
reporter_options: [
peep_bucket_calculator: Buckets
]
Expand Down

0 comments on commit 1ef379a

Please sign in to comment.