From 13976923a531e9630afc3ec71366bb51676be141 Mon Sep 17 00:00:00 2001 From: sbosse Date: Thu, 17 Oct 2024 23:43:32 +0200 Subject: [PATCH] Thu 17 Oct 23:42:52 CEST 2024 --- include/kernel/stats.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 include/kernel/stats.h diff --git a/include/kernel/stats.h b/include/kernel/stats.h new file mode 100644 index 0000000..54c30fe --- /dev/null +++ b/include/kernel/stats.h @@ -0,0 +1,34 @@ +#ifndef KERNEL_STATS_H +#define KERNEL_STATS_H + +#include "kernel/types.h" +#include "kernel/syscall.h" + +struct system_stats { + int time; + int blocks_read[4]; + int blocks_written[4]; +}; + +struct device_driver_stats { + int blocks_written; + int blocks_read; +}; + +struct bcache_stats { + int read_hits; + int read_misses; + int write_hits; + int write_misses; + int writebacks; +}; + +struct process_stats { + int blocks_read; + int blocks_written; + int bytes_read; + int bytes_written; + int syscall_count[MAX_SYSCALL]; +}; + +#endif