|
| 1 | +# Schema |
| 2 | + |
| 3 | +Below is an explanation of the current database schema. This schema is duplicated across the (currently) two database backends we support: sqlite and postgres. |
| 4 | + |
| 5 | +## Tables |
| 6 | + |
| 7 | +### benchmark |
| 8 | + |
| 9 | +The different types of benchmarks that are run. |
| 10 | + |
| 11 | +The table stores the name of the benchmark as well as whether it is capable of being run using the stable compiler. The benchmark name is used as a foreign key in many of the other tables. |
| 12 | + |
| 13 | +``` |
| 14 | +sqlite> select * from benchmark limit 1; |
| 15 | +name stabilized |
| 16 | +---------- ---------- |
| 17 | +helloworld 0 |
| 18 | +``` |
| 19 | + |
| 20 | +### artifact |
| 21 | + |
| 22 | +A description of a rustc compiler artifact being benchmarked. |
| 23 | + |
| 24 | +This description includes: |
| 25 | +* name: usually a commit sha or a tag like "1.51.0" |
| 26 | +* date: the date associated with this compiler artifact (usually only when the name is a commit) |
| 27 | +* type: currently one of "master" (i.e., we're testing a merge commit), "try" (someone is testing a PR), and "release" (usually a release candidate - though local compilers also get labeled like this). |
| 28 | + |
| 29 | +``` |
| 30 | +sqlite> select * from artifact limit 1; |
| 31 | +id name date type |
| 32 | +---------- ---------- ---------- ---------- |
| 33 | +1 LOCAL_TEST release |
| 34 | +``` |
| 35 | + |
| 36 | +### collection |
| 37 | + |
| 38 | +A "collection" of benchmarks tied only differing by the statistic collected. |
| 39 | + |
| 40 | +This is a way to collect statistics together signifying that they belong to the same logical benchmark run. |
| 41 | + |
| 42 | +Currently the collection also marks the git sha of the currently running collector binary. |
| 43 | + |
| 44 | +``` |
| 45 | +sqlite> select * from collection limit 1; |
| 46 | +id perf_commit |
| 47 | +---------- ----------------------------------------- |
| 48 | +1 d9fd96f409a15429757030f225b082744a72516c |
| 49 | +``` |
| 50 | + |
| 51 | +### pstat_series |
| 52 | + |
| 53 | +A unique collection of crate, profile, cache and statistic. |
| 54 | + |
| 55 | +* crate: the benchmarked crate which might be a crate from crates.io or a crate made specifically to stress some part of the compiler. |
| 56 | +* profile: what type of compilation is happening - check build, optimized build (a.k.a. release build), debug build, or doc build. |
| 57 | +* cache: how much of the incremental cache is full. An empty incremental cache means that the compiler must do a full build. |
| 58 | +* statistic: the type of stat being collected |
| 59 | + |
| 60 | +``` |
| 61 | +sqlite> select * from pstat_series limit 1; |
| 62 | +id crate profile cache statistic |
| 63 | +---------- ---------- ---------- ---------- ------------ |
| 64 | +1 helloworld check full task-clock:u |
| 65 | +``` |
| 66 | + |
| 67 | +### pstat |
| 68 | + |
| 69 | +A statistic that is unique to a pstat_series, artifact and collection. |
| 70 | + |
| 71 | +This stat is unique across a benchmarked crate, profile, cache state, statistic, rustc artifact, and benchmarks "collection". |
| 72 | + |
| 73 | +``` |
| 74 | +sqlite> select * from pstat limit 1; |
| 75 | +series aid cid value |
| 76 | +---------- ---------- ---------- ---------- |
| 77 | +1 1 1 24.93 |
| 78 | +``` |
| 79 | + |
| 80 | + |
| 81 | +### self_profile_query_series |
| 82 | + |
| 83 | +### self_profile_query |
| 84 | + |
| 85 | +### pull_request_builds |
| 86 | + |
| 87 | +### artifact_collection_duration |
| 88 | + |
| 89 | +Records how long benchmarking takes in seconds. |
| 90 | + |
| 91 | +``` |
| 92 | +sqlite> select * from artifact_collection_duration limit 1; |
| 93 | +aid date_recorded duration |
| 94 | +---------- ------------- ---------- |
| 95 | +1 1625829965 4 |
| 96 | +``` |
| 97 | + |
| 98 | +### collector_progress |
| 99 | + |
| 100 | +Keeps track of the collector's start and finish time as well as which step it's currently on. |
| 101 | + |
| 102 | +``` |
| 103 | +sqlite> select * from collector_progress limit 1; |
| 104 | +aid step start end |
| 105 | +---------- ---------- ---------- ---------- |
| 106 | +1 helloworld 1625829961 1625829965 |
| 107 | +``` |
| 108 | + |
| 109 | +### rustc_compilation |
| 110 | + |
| 111 | +### error_series |
| 112 | + |
| 113 | +### error |
0 commit comments