style(metrics): Change spelling

This commit is contained in:
Raghul Nanth A 2023-06-12 23:14:04 +05:30
parent f15e026101
commit 5d77839b25
2 changed files with 12 additions and 12 deletions

View file

@ -110,10 +110,10 @@ pub struct PublishReleaseNotes {
#[derive(Debug)] #[derive(Debug)]
pub enum MeasurementType { pub enum MeasurementType {
Build, Build,
AnalyseSelf, AnalyzeSelf,
AnalyseRipgrep, AnalyzeRipgrep,
AnalyseWebRender, AnalyzeWebRender,
AnalyseDiesel, AnalyzeDiesel,
} }
impl FromStr for MeasurementType { impl FromStr for MeasurementType {
@ -121,10 +121,10 @@ impl FromStr for MeasurementType {
fn from_str(s: &str) -> Result<Self, Self::Err> { fn from_str(s: &str) -> Result<Self, Self::Err> {
match s { match s {
"build" => Ok(Self::Build), "build" => Ok(Self::Build),
"self" => Ok(Self::AnalyseSelf), "self" => Ok(Self::AnalyzeSelf),
"ripgrep" => Ok(Self::AnalyseRipgrep), "ripgrep" => Ok(Self::AnalyzeRipgrep),
"webrender" => Ok(Self::AnalyseWebRender), "webrender" => Ok(Self::AnalyzeWebRender),
"diesel" => Ok(Self::AnalyseDiesel), "diesel" => Ok(Self::AnalyzeDiesel),
_ => Err("Invalid option".to_string()), _ => Err("Invalid option".to_string()),
} }
} }

View file

@ -35,15 +35,15 @@ impl flags::Metrics {
metrics.measure_build(sh)?; metrics.measure_build(sh)?;
"build.json" "build.json"
} }
MeasurementType::AnalyseSelf => { MeasurementType::AnalyzeSelf => {
metrics.measure_analysis_stats_self(sh)?; metrics.measure_analysis_stats_self(sh)?;
"self.json" "self.json"
} }
MeasurementType::AnalyseRipgrep => { MeasurementType::AnalyzeRipgrep => {
metrics.measure_analysis_stats(sh, "ripgrep")?; metrics.measure_analysis_stats(sh, "ripgrep")?;
"ripgrep.json" "ripgrep.json"
} }
MeasurementType::AnalyseWebRender => { MeasurementType::AnalyzeWebRender => {
{ {
// https://github.com/rust-lang/rust-analyzer/issues/9997 // https://github.com/rust-lang/rust-analyzer/issues/9997
let _d = sh.push_dir("target/rustc-perf/collector/benchmarks/webrender"); let _d = sh.push_dir("target/rustc-perf/collector/benchmarks/webrender");
@ -52,7 +52,7 @@ impl flags::Metrics {
metrics.measure_analysis_stats(sh, "webrender")?; metrics.measure_analysis_stats(sh, "webrender")?;
"webrender.json" "webrender.json"
} }
MeasurementType::AnalyseDiesel => { MeasurementType::AnalyzeDiesel => {
metrics.measure_analysis_stats(sh, "diesel/diesel")?; metrics.measure_analysis_stats(sh, "diesel/diesel")?;
"diesel.json" "diesel.json"
} }