Skip to content

Commit

Permalink
benchmark: also run on gtfstidy-ed GTFS ⚡️
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed Nov 2, 2024
1 parent bcee8af commit fa65b0e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions benchmark/index.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
BEGIN;
CREATE TEMP TABLE _benchmark (
dbname TEXT,
filename TEXT,
query TEXT,
avg FLOAT,
Expand Down Expand Up @@ -44,6 +45,7 @@ BEGIN

INSERT INTO _benchmark
SELECT
current_database() AS dbname,
_filename,
_query,
round(avg(elapsed)::numeric, 0),
Expand Down
15 changes: 15 additions & 0 deletions benchmark/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,18 @@ export PGDATABASE=benchmark_raw
../vbb-2022-07-01.gtfs/*.csv | sponge | psql -b

./run.sh

# The VBB 2022-07-01 GTFS feed doesn't contain any frequencies rows. In order to benchmark the frequencies implementations, we use `--minimize-stoptimes` to generate an equivalent feed that includes frequencies.
gtfstidy --show-warnings \
--minimize-stoptimes \
-o ../vbb-2022-07-01.tidied.gtfs ../vbb-2022-07-01.gtfs
ls -lh ../vbb-2022-07-01.tidied.gtfs

psql -c 'CREATE DATABASE benchmark_tidied'
export PGDATABASE=benchmark_tidied

../cli.js -d \
--stops-location-index --stats-by-route-date=view \
../vbb-2022-07-01.tidied.gtfs/*.txt | sponge | psql -b

./run.sh

0 comments on commit fa65b0e

Please sign in to comment.