Style and include cleanups.
This commit is contained in:
4
stats.c
4
stats.c
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user