Dump a complete report from a performance run, as JSON

When SHELL_PERF_OUTPUT is set, instead of just dumping out the metrics, dump
a more complete report with:

 - Event descriptions
 - Metric descriptions and value
 - Event log

Helper functions shell_perf_log_dump_events() and shell_perf_log_dump_log()
are added to ShellPerfLog to support this. The gnome-shell wrapper is adapted
to deal with the changed report format.

https://bugzilla.gnome.org/show_bug.cgi?id=618189
This commit is contained in:
Owen W. Taylor
2010-05-12 17:24:52 -04:00
parent e4e92a2b38
commit bc57574094
4 changed files with 257 additions and 19 deletions

View File

@ -3,6 +3,7 @@
#define __SHELL_PERF_LOG_H__
#include <glib-object.h>
#include <gio/gio.h>
G_BEGIN_DECLS
@ -64,10 +65,19 @@ void shell_perf_log_collect_statistics (ShellPerfLog *perf_log);
typedef void (*ShellPerfReplayFunction) (gint64 time,
const char *name,
const char *signature,
GValue *arg);
GValue *arg,
gpointer user_data);
void shell_perf_log_replay (ShellPerfLog *perf_log,
ShellPerfReplayFunction replay_function);
ShellPerfReplayFunction replay_function,
gpointer user_data);
gboolean shell_perf_log_dump_events (ShellPerfLog *perf_log,
GOutputStream *out,
GError **error);
gboolean shell_perf_log_dump_log (ShellPerfLog *perf_log,
GOutputStream *out,
GError **error);
G_END_DECLS