@@ -282,3 +282,59 @@ jobs:
282
282
283
283
- name : Export empty SQLite DB to Postgres
284
284
run : ./target/debug/sqlite-to-postgres "$(mktemp)" 'postgresql://postgres:postgres@localhost:5432/postgres'
285
+
286
+ site-endpoint :
287
+ name : Compare page endpoint test
288
+ runs-on : ubuntu-latest
289
+ services :
290
+ postgres :
291
+ image : postgres
292
+ env :
293
+ POSTGRES_PASSWORD : postgres
294
+ ports :
295
+ - 5432:5432
296
+
297
+ steps :
298
+ - name : Check out repository code
299
+ uses : actions/checkout@v2
300
+
301
+ - name : Install stable
302
+ uses : actions-rs/toolchain@v1
303
+ with :
304
+ toolchain : stable
305
+
306
+ - name : Install nightly
307
+ run : rustup install nightly
308
+
309
+ - name : Configure environment
310
+ run : |
311
+ sudo apt-get update
312
+ sudo apt-get install -y linux-tools-common linux-tools-generic linux-tools-`uname -r`
313
+ echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid
314
+
315
+ - uses : Swatinem/rust-cache@v2
316
+
317
+ - name : Build collector
318
+ run : cargo build -p collector
319
+
320
+ - name : Gather data
321
+ run : |
322
+ cargo run --bin collector bench_local `which rustc` --include syn --id version1 --db postgresql://postgres:[email protected] :5432/postgres
323
+ cargo run --bin collector bench_local `rustup +nightly which rustc` --include syn --id version2 --db postgresql://postgres:[email protected] :5432/postgres
324
+
325
+ - name : Build site
326
+ run : cargo build --bin site
327
+
328
+ # Check that data from the /get endpoint can be successfully queried.
329
+ - name : Query compare page data
330
+ run : |
331
+ DATABASE_URL=postgresql://postgres:[email protected] :5432/postgres cargo run --bin site &
332
+ curl http://localhost:2346/perf/get \
333
+ -H 'Content-Type:application/json' \
334
+ -d '{"start": "version1", "end": "version2", "stat": "instructions:u" }' \
335
+ --output out.msgpack \
336
+ --retry-connrefused \
337
+ --connect-timeout 5 \
338
+ --max-time 10 \
339
+ --retry 3 \
340
+ --retry-delay 5
0 commit comments