diff --git a/benchmark/index.sql b/benchmark/index.sql index 9d0371f..8857cc5 100644 --- a/benchmark/index.sql +++ b/benchmark/index.sql @@ -1,5 +1,6 @@ BEGIN; CREATE TEMP TABLE _benchmark ( + dbname TEXT, filename TEXT, query TEXT, avg FLOAT, @@ -44,6 +45,7 @@ BEGIN INSERT INTO _benchmark SELECT + current_database() AS dbname, _filename, _query, round(avg(elapsed)::numeric, 0), diff --git a/benchmark/init.sh b/benchmark/init.sh index 49d42d3..9116581 100755 --- a/benchmark/init.sh +++ b/benchmark/init.sh @@ -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