Skip to content
Snippets Groups Projects
Commit e590fa09 authored by Timothy Stack's avatar Timothy Stack
Browse files

Convert an event-sched.log file to an xplot graph. The output is

pretty simple at the moment, there is a line for each agent and dots
on the line where an event was fired.
parent 451c11a4
No related branches found
No related tags found
No related merge requests found
#! /usr/bin/awk -f
BEGIN {
printf("timeval unsigned\n");
printf("title\n");
printf("Event Timeline\n");
printf("xlabel\n");
printf("time\n");
printf("ylabel\n");
printf("agent\n");
printf("white\n");
firsttime = 0;
agents = 0;
}
/Agent: / {
agents += 1;
agent[$2] = agents;
}
/Fire: / {
split($3, tv, /:/);
split($5, aname, /:/);
if (firsttime == 0 || tv[2] < firsttime)
firsttime = tv[2];
if (aname[2] in agent) {
printf("x %s.%s %s\n", tv[2], tv[3], agent[aname[2]]);
}
}
END {
for (ag in agent) {
printf("rtext %s.0 %d\n%s\n", firsttime - 5, agent[ag], ag);
}
printf("go\n");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment