mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00

* 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
12 lines
328 B
Rust
12 lines
328 B
Rust
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,
|
|
}
|