[gnome-photos] main: Log the EggCounters before exiting
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] main: Log the EggCounters before exiting
- Date: Wed, 13 Jul 2016 15:00:26 +0000 (UTC)
commit 7ddd1462c174c6ffcf800653b1fafaba8eb99c8a
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Jul 13 16:52:58 2016 +0200
main: Log the EggCounters before exiting
src/photos-main.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-main.c b/src/photos-main.c
index f688558..526ddf3 100644
--- a/src/photos-main.c
+++ b/src/photos-main.c
@@ -30,14 +30,26 @@
#include <glib.h>
#include <glib/gi18n.h>
+#include "egg-counter.h"
#include "photos-application.h"
#include "photos-debug.h"
#include "photos-remote-display-manager.h"
+static void
+photos_main_counter_arena_foreach (EggCounter *counter, gpointer user_data)
+{
+ gint64 count;
+
+ count = egg_counter_get (counter);
+ photos_debug (PHOTOS_DEBUG_MEMORY, "%s.%s = %" G_GINT64_FORMAT, counter->category, counter->name, count);
+}
+
+
gint
main (gint argc, gchar *argv[])
{
+ EggCounterArena *counter_arena;
GtkApplication *app;
PhotosRemoteDisplayManager *remote_display_mngr;
gint exit_status;
@@ -61,5 +73,8 @@ main (gint argc, gchar *argv[])
g_object_unref (remote_display_mngr);
g_object_unref (app);
+ counter_arena = egg_counter_arena_get_default ();
+ egg_counter_arena_foreach (counter_arena, photos_main_counter_arena_foreach, NULL);
+
return exit_status;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]