Perf tools.

This commit is contained in:
Pedro Pinto committed 2018-12-12 23:18:45 +00:00
1 parent 9e768b7a24
commit d0647fb8d9
3 files changed
+9 -3

No files matched your search

@@ -123,9 +123,14 @@ select
event_type,
event_id,
ts,
hts
hts,
session_start
from event_log;
drop view if exists last_pretty_log;
create view last_pretty_log as
select * from pretty_log where session_start=(select max(session_start) from session);
/*
drop view if exists summary;
create view summary as select session_start,event_type,count(*) count, avg(t) avg, max(t) max, min(t) min, median(t) median, stdev(t) stdev from events group by session_start,event_type;
+1 -1
View File
@@ -80,7 +80,7 @@ class MDSource : public mercury::Actor, public mercury::IPollableActor {
auto &channel = _symbol_to_channel[handle.get_usersymbol()];
if (channel.empty())
channel = "sim";
channel = "sim_md";
_handles.push_back(
{utils::TimeStamp(), handle, channel.c_str()});
+2 -1
View File
@@ -17,7 +17,7 @@ $SQLLITE file:$HOME/sparkdata/data/databases/perf_log/perf_log.sqlite?mode=ro <<
.mode column
.width 60
.headers on
select * from pretty_log;
select * from last_pretty_log
EOF
fi
@@ -25,6 +25,7 @@ if [ $1 == "summary" ]; then
$SQLLITE file:$HOME/sparkdata/data/databases/perf_log/perf_log.sqlite?mode=ro <<EOF
.mode column
.headers on
.load $SQLITE_EXT
select session_start,event_type,count(*) count, avg(t) avg, max(t) max, min(t) min, median(t) median, stdev(t) stdev from events group by session_start,event_type;
EOF
fi