#!/bin/bash export MPS_TELEMETRY_FILENAME=/tmp/mpsio.log export MPS_SQLITE=/tmp/mps.sqlite MPS_TELEMETRY_CONTROL="all" \ ../src/emacs -Q --batch -l lisp/emacs-lisp/ert-tests.el \ --eval '(ert-run-tests-batch-and-exit "ert-test-\\(parse\\|plist\\|record\\|run-tests-batch-exp\\)")' mpseventcnv -f $MPS_TELEMETRY_FILENAME | mpseventsql -p -d -o $MPS_SQLITE sqlite3 $MPS_SQLITE "select root,label,avg(delta),min(delta),max(delta),count(*) as count from (select root, (select I.string from EVENT_Intern AS I, EVENT_Label AS L where I.stringId = L.stringId and R.root=L.address) as label,time, time - lag(time) over (order by time) as delta from (select root,time from EVENT_RootScan union select 'flip',time from EVENT_TraceFlipBegin) R) group by root order by avg(delta) ;"