Skip to content

Commit

Permalink
Merge pull request #912 from AppFlowy-IO/fix-misleading-metric-naming
Browse files Browse the repository at this point in the history
chore: fix misleading metric description and method name for access control metrics
  • Loading branch information
khorshuheng authored Oct 21, 2024
2 parents 2f715c3 + bd3e5ac commit 9a4d633
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libs/access-control/src/casbin/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl Adapter for PgAdapter {

self
.access_control_metrics
.record_load_all_policies_in_secs(start.elapsed().as_millis() as u64);
.record_load_all_policies_in_ms(start.elapsed().as_millis() as u64);

Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions libs/access-control/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl AccessControlMetrics {
let realtime_registry = registry.sub_registry_with_prefix("ac");
realtime_registry.register(
"load_all_polices",
"load all polices when server start duration in seconds",
"load all polices when server start duration in milliseconds",
metrics.load_all_policies.clone(),
);

Expand All @@ -48,7 +48,7 @@ impl AccessControlMetrics {
metrics
}

pub fn record_load_all_policies_in_secs(&self, millis: u64) {
pub fn record_load_all_policies_in_ms(&self, millis: u64) {
self.load_all_policies.set(millis as i64);
}

Expand Down

0 comments on commit 9a4d633

Please sign in to comment.