-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathkstats.h
More file actions
29 lines (24 loc) · 774 Bytes
/
Copy pathkstats.h
File metadata and controls
29 lines (24 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef KSTATS_H
#define KSTATS_H
#include "kqueue.h"
#include "tpool.h"
#include "cpu_util.h"
#include "ktimer.h"
struct kstats {
struct kqueue *kqueue;
struct tpool *tpool;
struct cpu_util * cpu_util;
struct ktimer ktimer;
struct kqueue_stats rqstats_prev;
struct kqueue_stats rqstats_curr;
struct tpool_stats tpstats_prev;
struct tpool_stats tpstats_curr;
struct cpu_util_stats custats_prev;
struct cpu_util_stats custats_curr;
};
void kstats_init(struct kstats *kstats, struct kqueue *kqueue,
struct tpool *tpool, struct cpu_util *cpu_util);
int kstats_start(struct kstats *kstats, unsigned int period_ms);
int kstats_stop(struct kstats *kstats);
void kstats_print_lifetime_statistics(struct kstats *kstats);
#endif // KSTATS_H