rust-lang / rust-lang/rustc-perf

Rename database schema items for clarity and consistency

Open
#937 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-database C-improvement
Dominant language
Rust
Stars
733
Forks
189
Avg merge
10h 52m
Merged PRs (30d)
43

Description

I've been looking at the current database schema to try to understand how it works. I've looked at the recently added schema documentation and some of the names were difficult to decipher at a glance. For example, the column names aid and cid and the table names pstat_series and pstats. (What does the p stand for?)

I think it would help the reader understand the database schema faster if some of these things were renamed. I propose the following:

  • aid columns -> artifact_id
  • cid columns -> collection_id
  • crate columns -> benchmark_id
  • series columns -> series_id
  • benchmark.stablized -> benchmark.runs_on_stable
  • pstats table -> statistics
  • pstat_series table -> statistics_series

This creates consistency in the schema in that all columns which reference other tables' primary keys are identified via the _id suffix and it makes it easier to understand what a column is at a glance by expanding some of the single letter abbreviations.

This is relatively easy to do and the migrations to perform these renamings will run quickly since this only affects table metadata and not the content of the tables themselves.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked database/schema.md documentation, then locate the schema definitions, migrations, and code references for the listed columns and tables. Check that each proposed rename is reflected consistently in the schema, queries, migrations, and documentation; done means the names are unambiguous and existing data remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.