diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-10-21 12:44:37 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-10-21 12:44:37 +0000 |
commit | 244acf03bb6313c3e8a900c940f1eed5536c7aa9 (patch) | |
tree | 02b7b8c5741a7b57332338055ee2e902eab21e0e /src/statistics | |
parent | 8ee36bffa3c4afdb4d41ee9cd9565bac2ead9d2c (diff) | |
download | gnunet-244acf03bb6313c3e8a900c940f1eed5536c7aa9.tar.gz gnunet-244acf03bb6313c3e8a900c940f1eed5536c7aa9.zip |
extra debug for datastore, stats api fix
Diffstat (limited to 'src/statistics')
-rw-r--r-- | src/statistics/gnunet-statistics.c | 8 | ||||
-rw-r--r-- | src/statistics/statistics_api.c | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c index bea9ca0ca..dd9850418 100644 --- a/src/statistics/gnunet-statistics.c +++ b/src/statistics/gnunet-statistics.c | |||
@@ -65,11 +65,13 @@ static int persistent; | |||
65 | static int | 65 | static int |
66 | printer (void *cls, | 66 | printer (void *cls, |
67 | const char *subsystem, | 67 | const char *subsystem, |
68 | const char *name, unsigned long long value, int is_persistent) | 68 | const char *name, |
69 | uint64_t value, int is_persistent) | ||
69 | { | 70 | { |
70 | FPRINTF (stdout, | 71 | FPRINTF (stdout, |
71 | "%s%-20s %-40s: %16llu\n", | 72 | "%s%-20s %-40s: %16llu\n", |
72 | is_persistent ? "!" : " ", subsystem, _(name), value); | 73 | is_persistent ? "!" : " ", subsystem, _(name), |
74 | (unsigned long long) value); | ||
73 | return GNUNET_OK; | 75 | return GNUNET_OK; |
74 | } | 76 | } |
75 | 77 | ||
@@ -127,7 +129,7 @@ run (void *cls, | |||
127 | ret = 1; | 129 | ret = 1; |
128 | return; | 130 | return; |
129 | } | 131 | } |
130 | GNUNET_STATISTICS_set (h, name, val, persistent); | 132 | GNUNET_STATISTICS_set (h, name, (uint64_t) val, persistent); |
131 | GNUNET_STATISTICS_destroy (h); | 133 | GNUNET_STATISTICS_destroy (h); |
132 | return; | 134 | return; |
133 | } | 135 | } |
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index 335cd4165..21b8ecd8a 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c | |||
@@ -88,7 +88,7 @@ struct ActionItem | |||
88 | /** | 88 | /** |
89 | * Associated value. | 89 | * Associated value. |
90 | */ | 90 | */ |
91 | unsigned long long value; | 91 | uint64_t value; |
92 | 92 | ||
93 | /** | 93 | /** |
94 | * Flag for SET/UPDATE actions. | 94 | * Flag for SET/UPDATE actions. |
@@ -630,7 +630,7 @@ static void | |||
630 | add_setter_action (struct GNUNET_STATISTICS_Handle *h, | 630 | add_setter_action (struct GNUNET_STATISTICS_Handle *h, |
631 | const char *name, | 631 | const char *name, |
632 | int make_persistent, | 632 | int make_persistent, |
633 | unsigned long long value, enum ActionType type) | 633 | uint64_t value, enum ActionType type) |
634 | { | 634 | { |
635 | struct ActionItem *ai; | 635 | struct ActionItem *ai; |
636 | size_t slen; | 636 | size_t slen; |
@@ -674,7 +674,7 @@ add_setter_action (struct GNUNET_STATISTICS_Handle *h, | |||
674 | void | 674 | void |
675 | GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle, | 675 | GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle, |
676 | const char *name, | 676 | const char *name, |
677 | unsigned long long value, int make_persistent) | 677 | uint64_t value, int make_persistent) |
678 | { | 678 | { |
679 | add_setter_action (handle, name, make_persistent, value, ACTION_SET); | 679 | add_setter_action (handle, name, make_persistent, value, ACTION_SET); |
680 | } | 680 | } |
@@ -692,7 +692,7 @@ GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle, | |||
692 | void | 692 | void |
693 | GNUNET_STATISTICS_update (struct GNUNET_STATISTICS_Handle *handle, | 693 | GNUNET_STATISTICS_update (struct GNUNET_STATISTICS_Handle *handle, |
694 | const char *name, | 694 | const char *name, |
695 | long long delta, int make_persistent) | 695 | int64_t delta, int make_persistent) |
696 | { | 696 | { |
697 | add_setter_action (handle, name, make_persistent, | 697 | add_setter_action (handle, name, make_persistent, |
698 | (unsigned long long) delta, ACTION_UPDATE); | 698 | (unsigned long long) delta, ACTION_UPDATE); |