Skip to content

Commit 99d3677

Browse files
committed
Change more references to stat
1 parent 5a47b9b commit 99d3677

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

site/src/github.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -580,15 +580,15 @@ fn make_comparison_url(commit: &QueuedCommit, stat: Metric) -> String {
580580
)
581581
}
582582

583-
async fn calculate_stat_comparison(
583+
async fn calculate_metric_comparison(
584584
ctxt: &SiteCtxt,
585585
commit: &QueuedCommit,
586-
stat: Metric,
586+
metric: Metric,
587587
) -> Result<ArtifactComparison, String> {
588588
match crate::comparison::compare(
589589
collector::Bound::Commit(commit.parent_sha.clone()),
590590
collector::Bound::Commit(commit.sha.clone()),
591-
stat,
591+
metric,
592592
ctxt,
593593
)
594594
.await
@@ -611,7 +611,7 @@ async fn summarize_run(
611611
comparison_url = make_comparison_url(&commit, Metric::Instructions)
612612
);
613613

614-
let inst_comparison = calculate_stat_comparison(ctxt, &commit, Metric::Instructions).await?;
614+
let inst_comparison = calculate_metric_comparison(ctxt, &commit, Metric::Instructions).await?;
615615

616616
let errors = if !inst_comparison.newly_failed_benchmarks.is_empty() {
617617
let benchmarks = inst_comparison
@@ -629,7 +629,7 @@ async fn summarize_run(
629629
.summarize_by_category(&benchmark_map);
630630

631631
let mut table_written = false;
632-
let stats = vec![
632+
let metrics = vec![
633633
(
634634
"Instruction count",
635635
Metric::Instructions,
@@ -640,24 +640,24 @@ async fn summarize_run(
640640
"Max RSS (memory usage)",
641641
Metric::MaxRSS,
642642
true,
643-
calculate_stat_comparison(ctxt, &commit, Metric::MaxRSS).await?,
643+
calculate_metric_comparison(ctxt, &commit, Metric::MaxRSS).await?,
644644
),
645645
(
646646
"Cycles",
647647
Metric::Cycles,
648648
true,
649-
calculate_stat_comparison(ctxt, &commit, Metric::Cycles).await?,
649+
calculate_metric_comparison(ctxt, &commit, Metric::Cycles).await?,
650650
),
651651
];
652652

653-
for (title, stat, hidden, comparison) in stats {
653+
for (title, metric, hidden, comparison) in metrics {
654654
message.push_str(&format!(
655655
"\n### [{title}]({})\n",
656-
make_comparison_url(&commit, stat)
656+
make_comparison_url(&commit, metric)
657657
));
658658

659659
let (primary, secondary) = comparison.summarize_by_category(&benchmark_map);
660-
table_written |= write_stat_summary(primary, secondary, hidden, &mut message).await;
660+
table_written |= write_metric_summary(primary, secondary, hidden, &mut message).await;
661661
}
662662

663663
if table_written {
@@ -677,7 +677,7 @@ async fn summarize_run(
677677
}
678678

679679
/// Returns true if a summary table was written to `message`.
680-
async fn write_stat_summary(
680+
async fn write_metric_summary(
681681
primary: ArtifactComparisonSummary,
682682
secondary: ArtifactComparisonSummary,
683683
hidden: bool,

0 commit comments

Comments
 (0)