You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Store compile benchmark codegen backend into the database
Since we're already modifying the pstat_series table,
this commit also renames the cache column to scenario,
and the statistic column to metric, to resolve a long-standing
mismatch in the terminology.
For runtime benchmarks the schema very similar, but there are different table names:
@@ -140,19 +141,20 @@ of a crate, profile, scenario and the metric being collected.
140
141
141
142
* crate (aka `benchmark`): the benchmarked crate which might be a crate from crates.io or a crate made specifically to stress some part of the compiler.
142
143
* profile: what type of compilation is happening - check build, optimized build (a.k.a. release build), debug build, or doc build.
143
-
* cache (aka `scenario`): describes how much of the incremental cache is full. An empty incremental cache means that the compiler must do a full build.
144
-
* statistic (aka `metric`): the type of metric being collected
144
+
* scenario: describes how much of the incremental cache is full. An empty incremental cache means that the compiler must do a full build.
145
+
* backend: codegen backend used for compilation.
146
+
* metric: the type of metric being collected.
145
147
146
148
This corresponds to a [`statistic description`](../docs/glossary.md).
147
149
148
-
There is a separate table for this collection to avoid duplicating crates, prfiles, scenarios etc.
150
+
There is a separate table for this collection to avoid duplicating crates, profiles, scenarios etc.
get_error: conn.prepare("select benchmark, error from error where aid = $1").await.unwrap(),
444
-
insert_pstat_series: conn.prepare("insert into pstat_series (crate, profile, cache, statistic) VALUES ($1, $2, $3, $4) ON CONFLICT DO NOTHING RETURNING id").await.unwrap(),
445
-
select_pstat_series: conn.prepare("select id from pstat_series where crate = $1 and profile = $2 and cache = $3 and statistic = $4").await.unwrap(),
453
+
insert_pstat_series: conn.prepare("insert into pstat_series (crate, profile, scenario, backend, metric) VALUES ($1, $2, $3, $4, $5) ON CONFLICT DO NOTHING RETURNING id").await.unwrap(),
454
+
select_pstat_series: conn.prepare("select id from pstat_series where crate = $1 and profile = $2 and scenario = $3 and backend = $4 and metric = $5").await.unwrap(),
446
455
collection_id: conn.prepare("insert into collection (perf_commit) VALUES ($1) returning id").await.unwrap(),
447
456
record_duration: conn.prepare("
448
457
insert into artifact_collection_duration (
@@ -592,7 +601,7 @@ where
592
601
pstat_series:self
593
602
.conn()
594
603
.query(
595
-
"select id, crate, profile, cache, statistic from pstat_series;",
604
+
"select id, crate, profile, scenario, backend, metric from pstat_series;",
@@ -633,21 +652,25 @@ impl Connection for SqliteConnection {
633
652
benchmark:&str,
634
653
profile:Profile,
635
654
scenario:crate::Scenario,
655
+
backend:CodegenBackend,
636
656
metric:&str,
637
657
value:f64,
638
658
){
639
659
let profile = profile.to_string();
640
660
let scenario = scenario.to_string();
641
-
self.raw_ref().execute("insert or ignore into pstat_series (crate, profile, cache, statistic) VALUES (?, ?, ?, ?)",params![
661
+
let backend = backend.to_string();
662
+
self.raw_ref().execute("insert or ignore into pstat_series (crate, profile, scenario, backend, metric) VALUES (?, ?, ?, ?, ?)",params![
642
663
&benchmark,
643
664
&profile,
644
665
&scenario,
666
+
&backend,
645
667
&metric,
646
668
]).unwrap();
647
-
let sid:i32 = self.raw_ref().query_row("select id from pstat_series where crate = ? and profile = ? and cache = ? and statistic = ?",params![
669
+
let sid:i32 = self.raw_ref().query_row("select id from pstat_series where crate = ? and profile = ? and scenario = ? and backend = ? and metric = ?",params![
Copy file name to clipboardExpand all lines: docs/glossary.md
+2
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,8 @@ The following is a glossary of domain specific terminology. Although benchmarks
21
21
-`incr-full`: incremental compilation is used, with an empty incremental cache.
22
22
-`incr-unchanged`: incremental compilation is used, with a full incremental cache and no code changes made.
23
23
-`incr-patched`: incremental compilation is used, with a full incremental cache and some code changes made.
24
+
***backend**: the codegen backend used for compiling Rust code.
25
+
-`llvm`: the default codegen backend
24
26
***category**: a high-level group of benchmarks. Currently, there are three categories, primary (mostly real-world crates), secondary (mostly stress tests), and stable (old real-world crates, only used for the dashboard).
25
27
***artifact type**: describes what kind of artifact does the benchmark build. Either `library` or `binary`.
0 commit comments