From e0bcecee6042b219c6626172851af5a25362b948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 11 Feb 2020 17:23:40 +0100 Subject: refactor: Remove atomics from metrics (#3968) * replace "AtomicUsize" with "u64" for field type on "Metrics" * move "compiler_starts" field from "Metrics" to "GlobalState" --- cli/compilers/ts.rs | 5 +---- cli/compilers/wasm.rs | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'cli/compilers') diff --git a/cli/compilers/ts.rs b/cli/compilers/ts.rs index d0c0d87c0..a6ed8237d 100644 --- a/cli/compilers/ts.rs +++ b/cli/compilers/ts.rs @@ -257,10 +257,7 @@ impl TsCompiler { .expect("Unable to create worker state"); // Count how many times we start the compiler worker. - global_state - .metrics - .compiler_starts - .fetch_add(1, Ordering::SeqCst); + global_state.compiler_starts.fetch_add(1, Ordering::SeqCst); let mut worker = CompilerWorker::new( "TS".to_string(), diff --git a/cli/compilers/wasm.rs b/cli/compilers/wasm.rs index 9bc9d2ab4..d6f0d2f4a 100644 --- a/cli/compilers/wasm.rs +++ b/cli/compilers/wasm.rs @@ -61,10 +61,7 @@ impl WasmCompiler { .expect("Unable to create worker state"); // Count how many times we start the compiler worker. - global_state - .metrics - .compiler_starts - .fetch_add(1, Ordering::SeqCst); + global_state.compiler_starts.fetch_add(1, Ordering::SeqCst); let mut worker = CompilerWorker::new( "WASM".to_string(), -- cgit v1.2.3