[gnome-builder] clang: add performance counters for parse requests
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] clang: add performance counters for parse requests
- Date: Fri, 8 May 2015 02:03:17 +0000 (UTC)
commit f0a803963ebdee5cda68dd5ba9f59312467c796f
Author: Christian Hergert <christian hergert me>
Date: Thu May 7 19:00:06 2015 -0700
clang: add performance counters for parse requests
This helps us keep track of how many translation unit parses we are
performing.
libide/clang/ide-clang-service.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libide/clang/ide-clang-service.c b/libide/clang/ide-clang-service.c
index 7fc8992..2e45a45 100644
--- a/libide/clang/ide-clang-service.c
+++ b/libide/clang/ide-clang-service.c
@@ -21,6 +21,8 @@
#include <clang-c/Index.h>
#include <glib/gi18n.h>
+#include "egg-counter.h"
+
#include "ide-clang-highlighter.h"
#include "ide-build-system.h"
#include "ide-clang-private.h"
@@ -70,6 +72,11 @@ typedef struct
G_DEFINE_TYPE (IdeClangService, ide_clang_service, IDE_TYPE_SERVICE)
+EGG_DEFINE_COUNTER (ParseAttempts,
+ "Clang",
+ "Total Parse Attempts",
+ "Total number of attempts to create a translation unit.")
+
static void
parse_request_free (gpointer data)
{
@@ -278,6 +285,7 @@ ide_clang_service_parse_worker (GTask *task,
argv = (const gchar * const *)request->command_line_args;
argc = argv ? g_strv_length (request->command_line_args) : 0;
+ EGG_COUNTER_INC (ParseAttempts);
code = clang_parseTranslationUnit2 (request->index,
request->source_filename,
argv, argc,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]