Style and include cleanups.

This commit is contained in:
Ian Gulliver
2016-02-17 16:40:09 -08:00
parent 8e2e7b2562
commit ae5b4c1ce4
19 changed files with 213 additions and 245 deletions

View File

@@ -3,23 +3,19 @@
#include <jansson.h>
#include "common.h"
#include "backend.h"
#include "json.h"
#include "stats.h"
static struct stats_state {
uint64_t total_count;
uint64_t type_count[NUM_TYPES];
struct timespec start;
} stats_state = { 0 };
void stats_init() {
assert(clock_gettime(CLOCK_MONOTONIC, &stats_state.start) == 0);
}
void stats_serialize(struct packet *packet, struct buf *buf) {
if (packet) {
stats_state.total_count++;