summaryrefslogtreecommitdiffstats
path: root/src/global_statistics.h
diff options
context:
space:
mode:
authorLennart Weller <lhw@ring0.de>2016-09-05 08:27:21 +0000
committerLennart Weller <lhw@ring0.de>2016-09-05 08:27:21 +0000
commit1746898cefcb17f58b5cf27b4dad3d28236f1152 (patch)
tree9207f191cf39bbd077a1e1c73d6e82123e2fc710 /src/global_statistics.h
parentImported Upstream version 1.2.0+dfsg (diff)
downloadnetdata-1746898cefcb17f58b5cf27b4dad3d28236f1152.tar.xz
netdata-1746898cefcb17f58b5cf27b4dad3d28236f1152.zip
Imported Upstream version 1.3.0+dfsgupstream/1.3.0+dfsg
Diffstat (limited to 'src/global_statistics.h')
-rw-r--r--src/global_statistics.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/global_statistics.h b/src/global_statistics.h
index ce3c3490e..d28aa4401 100644
--- a/src/global_statistics.h
+++ b/src/global_statistics.h
@@ -5,16 +5,32 @@
// global statistics
struct global_statistics {
- unsigned long long connected_clients;
- unsigned long long web_requests;
- unsigned long long bytes_received;
- unsigned long long bytes_sent;
+ volatile uint16_t connected_clients;
+ volatile uint64_t web_requests;
+ volatile uint64_t web_usec;
+ volatile uint64_t web_usec_max;
+ volatile uint64_t bytes_received;
+ volatile uint64_t bytes_sent;
+ volatile uint64_t content_size;
+ volatile uint64_t compressed_content_size;
};
-extern struct global_statistics global_statistics;
+extern volatile struct global_statistics global_statistics;
extern void global_statistics_lock(void);
extern void global_statistics_unlock(void);
+extern void finished_web_request_statistics(uint64_t dt,
+ uint64_t bytes_received,
+ uint64_t bytes_sent,
+ uint64_t content_size,
+ uint64_t compressed_content_size);
+
+extern void web_client_connected(void);
+extern void web_client_disconnected(void);
+
+#define GLOBAL_STATS_RESET_WEB_USEC_MAX 0x01
+extern void global_statistics_copy(struct global_statistics *gs, uint8_t options);
+extern void global_statistics_charts(void);
#endif /* NETDATA_GLOBAL_STATISTICS_H */