Files
linuxkit/alpine/packages/transfused/transfused_perfstat.h
David Sheets dc7069db1c transfused: add perfstat machinery
This adds two new control channel requests, START_PERFSTAT and
STOP_PERFSTAT, that begin and end performance statistics collection
respectively. START_PERFSTAT takes the name of the mountpoint on which
to enable statistics collection and returns the current monotonic time.
STOP_PERFSTAT takes the name of the mountpoint on which to disable
statistics collection and returns the current monotonic time and the
message timings that have been collected.

Performance statistics are collected in a linked list of blocks. pthread
locks are used for synchronization.

Signed-off-by: David Sheets <dsheets@docker.com>
2017-01-31 18:07:31 +00:00

30 lines
656 B
C

#ifndef _TRANSFUSED_PERFSTAT_H_
#define _TRANSFUSED_PERFSTAT_H_
#include <inttypes.h>
struct connection;
struct parameters;
typedef struct {
uint64_t id;
uint64_t start;
uint64_t stop;
} perfstat_t;
struct perfstats {
uint32_t len;
uint32_t nothing;
struct perfstats *next;
perfstat_t perfstat[0];
};
typedef struct perfstats perfstats_t;
int perfstat_open(uint64_t unique, struct connection *conn);
int perfstat_close(uint64_t unique, struct connection *conn);
void *start_perfstat(struct parameters *params, char *req, size_t len);
void *stop_perfstat(struct parameters *params, char *req, size_t len);
#endif /* _TRANSFUSED_PERFSTAT_H_ */