diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-02-11 17:23:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 17:23:40 +0100 |
commit | e0bcecee6042b219c6626172851af5a25362b948 (patch) | |
tree | 6d56a581d715738c9e38fc4e4077c96c083f67ba /cli/metrics.rs | |
parent | 5a143cdbd34df590a24ec756a6319a89d7656e5c (diff) |
refactor: Remove atomics from metrics (#3968)
* replace "AtomicUsize" with "u64" for field type on "Metrics"
* move "compiler_starts" field from "Metrics" to "GlobalState"
Diffstat (limited to 'cli/metrics.rs')
-rw-r--r-- | cli/metrics.rs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/cli/metrics.rs b/cli/metrics.rs index d1e7567b9..12a0b3f8f 100644 --- a/cli/metrics.rs +++ b/cli/metrics.rs @@ -1,12 +1,10 @@ -use std::sync::atomic::AtomicUsize; - +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. #[derive(Default)] pub struct Metrics { - pub ops_dispatched: AtomicUsize, - pub ops_completed: AtomicUsize, - pub bytes_sent_control: AtomicUsize, - pub bytes_sent_data: AtomicUsize, - pub bytes_received: AtomicUsize, - pub resolve_count: AtomicUsize, - pub compiler_starts: AtomicUsize, + pub ops_dispatched: u64, + pub ops_completed: u64, + pub bytes_sent_control: u64, + pub bytes_sent_data: u64, + pub bytes_received: u64, + pub resolve_count: u64, } |