diff options
author | Aleksey Kladov <[email protected]> | 2020-07-25 09:35:45 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-25 09:35:45 +0100 |
commit | 451edcc09866d43def7db88d5d9c139a96ead58e (patch) | |
tree | 80f2d6a55aca6d66ff5b36c9166fd49fb76ef97b /crates/rust-analyzer/src/cli.rs | |
parent | 0a4e90c0f855df29eb60445bf68ab959c59914ed (diff) |
Add rustc-perf to metrics
Diffstat (limited to 'crates/rust-analyzer/src/cli.rs')
-rw-r--r-- | crates/rust-analyzer/src/cli.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/cli.rs b/crates/rust-analyzer/src/cli.rs index 753001949..a9b9c8923 100644 --- a/crates/rust-analyzer/src/cli.rs +++ b/crates/rust-analyzer/src/cli.rs | |||
@@ -74,3 +74,10 @@ fn read_stdin() -> Result<String> { | |||
74 | std::io::stdin().read_to_string(&mut buff)?; | 74 | std::io::stdin().read_to_string(&mut buff)?; |
75 | Ok(buff) | 75 | Ok(buff) |
76 | } | 76 | } |
77 | |||
78 | fn report_metric(metric: &str, value: u64, unit: &str) { | ||
79 | if std::env::var("RA_METRICS").is_err() { | ||
80 | return; | ||
81 | } | ||
82 | println!("METRIC:{}:{}:{}", metric, value, unit) | ||
83 | } | ||