Skip to content

Commit

Permalink
Truncate test_run table in benchmark.db to the last 90 days (#1523)
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmakait authored Aug 5, 2024
1 parent 3743172 commit 2c24295
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ci/scripts/combine-dbs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ else
fi
DB_NAME=benchmark.tmp.db alembic upgrade head

# Delete old records and vacuum to reduce on-disk size
sqlite3 benchmark.tmp.db <<EOF
DELETE FROM test_run WHERE session_id not in (SELECT DISTINCT session_id FROM test_run WHERE start > date('now', '-90 days'));
VACUUM;
EOF
# Merge in the individual job dbs into our working copy
for FILE in $(find . -name "*.db")
do
Expand Down

0 comments on commit 2c24295

Please sign in to comment.