summaryrefslogtreecommitdiff
path: root/cli/metrics.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2019-11-04 16:38:52 +0100
committerRy Dahl <ry@tinyclouds.org>2019-11-04 10:38:52 -0500
commit0049d4e50c9dd945f25f69b08b08fbf492001f96 (patch)
tree3bcf3c50bdba9abba6b1b8ff9340f76fc19f759c /cli/metrics.rs
parent429439d1983269ba40141a1b42f6ac809d1e8c86 (diff)
Refactor Worker and ThreadSafeState (#3242)
* Split ThreadSafeState into State and GlobalState. State is a "local" state belonging to "Worker" while "GlobalState" is state shared by whole program. * Update "Worker" and ops to use "GlobalState" where applicable * Move and refactor "WorkerChannels" resource
Diffstat (limited to 'cli/metrics.rs')
-rw-r--r--cli/metrics.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/metrics.rs b/cli/metrics.rs
new file mode 100644
index 000000000..d1e7567b9
--- /dev/null
+++ b/cli/metrics.rs
@@ -0,0 +1,12 @@
+use std::sync::atomic::AtomicUsize;
+
+#[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,
+}