summaryrefslogtreecommitdiff
path: root/qa/src/mmv_nostats.c
diff options
context:
space:
mode:
Diffstat (limited to 'qa/src/mmv_nostats.c')
-rw-r--r--qa/src/mmv_nostats.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/qa/src/mmv_nostats.c b/qa/src/mmv_nostats.c
new file mode 100644
index 0000000..d82bd60
--- /dev/null
+++ b/qa/src/mmv_nostats.c
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2010 Aconex. All Rights Reserved.
+ */
+
+#include <pcp/pmapi.h>
+#include <pcp/mmv_stats.h>
+
+int
+main(int ac, char * av[])
+{
+ char * file = (ac > 1) ? av[1] : "nostats";
+ void * addr = mmv_stats_init(file, 0, 0,
+ NULL, 0, NULL, 0);
+
+ if (!addr) {
+ fprintf(stderr, "mmv_stats_init failed : %s\n", strerror(errno));
+ return 1;
+ }
+
+ mmv_stats_add(addr, "counter", "", 40);
+
+ return 0;
+}