diff options
author | Tor Egge <Tor.Egge@online.no> | 2021-12-02 10:48:30 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2021-12-02 10:48:30 +0100 |
commit | d170b0473c80ebd0f4cc44a411feba1c4f4edefd (patch) | |
tree | a73752dd145238f9df8ac11e2f98ecc59607cbc6 /storage | |
parent | 5b80ef46f4d6342084fa6b72b0213770d18de030 (diff) |
Measure latency in milliseconds.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.cpp | 2 | ||||
-rw-r--r-- | storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.cpp b/storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.cpp index e2259b98b3f..b48ef5bf463 100644 --- a/storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.cpp @@ -7,7 +7,7 @@ namespace storage { ActiveOperationsMetrics::ActiveOperationsMetrics(metrics::MetricSet* parent) : MetricSet("active_operations", {}, "metrics for active operations at service layer", parent), size("size", {}, "Number of concurrent active operations", this), - latency("latency", {}, "Latency for active operations", this) + latency("latency", {}, "Latency (in ms) for active operations", this) { } diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp index 99ff3eb1bcb..78d4dffd40e 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp @@ -1081,7 +1081,7 @@ FileStorHandlerImpl::Stripe::release(const document::Bucket & bucket, entry._sharedLocks.erase(shared_iter); } Clock::time_point now_ts = Clock::now(); - double latency = std::chrono::duration<double>(now_ts - start_time).count(); + double latency = std::chrono::duration<double, std::milli>(now_ts - start_time).count(); _active_operations_stats.operation_done(latency); if (!entry._exclusiveLock && entry._sharedLocks.empty()) { _lockedBuckets.erase(iter); // No more locks held |