Skip to content

Commit

Permalink
feat: add benchmarks pg indexes (#34536)
Browse files Browse the repository at this point in the history
* feat: add benchmarks pg indexes

* refactor: remove debug `df -h`
  • Loading branch information
McPatate authored Oct 31, 2024
1 parent b5919e1 commit 294c170
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:
commit_id=$GITHUB_SHA
fi
commit_msg=$(git show -s --format=%s | cut -c1-70)
df -h
python3 benchmark/llama.py "${{ github.head_ref || github.ref_name }}" "$commit_id" "$commit_msg"
env:
HF_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
Expand Down
7 changes: 7 additions & 0 deletions benchmark/init_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ CREATE TABLE IF NOT EXISTS benchmarks (
created_at timestamp without time zone NOT NULL DEFAULT (current_timestamp AT TIME ZONE 'UTC')
);

CREATE INDEX IF NOT EXISTS benchmarks_benchmark_id_idx ON benchmarks (benchmark_id);

CREATE INDEX IF NOT EXISTS benchmarks_branch_idx ON benchmarks (branch);

CREATE TABLE IF NOT EXISTS device_measurements (
measurement_id SERIAL PRIMARY KEY,
benchmark_id int REFERENCES benchmarks (benchmark_id),
Expand All @@ -17,10 +21,13 @@ CREATE TABLE IF NOT EXISTS device_measurements (
time timestamp without time zone NOT NULL DEFAULT (current_timestamp AT TIME ZONE 'UTC')
);

CREATE INDEX IF NOT EXISTS device_measurements_branch_idx ON device_measurements (benchmark_id);

CREATE TABLE IF NOT EXISTS model_measurements (
measurement_id SERIAL PRIMARY KEY,
benchmark_id int REFERENCES benchmarks (benchmark_id),
measurements jsonb,
time timestamp without time zone NOT NULL DEFAULT (current_timestamp AT TIME ZONE 'UTC')
);

CREATE INDEX IF NOT EXISTS model_measurements_branch_idx ON model_measurements (benchmark_id);

0 comments on commit 294c170

Please sign in to comment.