diff options
author | Maria Matejka <mq@ucw.cz> | 2023-04-26 19:10:52 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-04-26 19:10:52 +0200 |
commit | 2ddb34c9d18bc4e793c04658b7bec243e35d6b17 (patch) | |
tree | 385d514028edf13065a15b54a3095d3bdcdee5b6 /sysdep/unix/io-loop.h | |
parent | ce7495b49a5192b1cba17fd88cdb2495a40824e2 (diff) |
IO loops now actually measuring their time (show threads all works)
Diffstat (limited to 'sysdep/unix/io-loop.h')
-rw-r--r-- | sysdep/unix/io-loop.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdep/unix/io-loop.h b/sysdep/unix/io-loop.h index 2b0b7ebf..b5da7aba 100644 --- a/sysdep/unix/io-loop.h +++ b/sysdep/unix/io-loop.h @@ -29,6 +29,11 @@ void pipe_pollin(struct pipe *, struct pfd *); void pipe_drain(struct pipe *); void pipe_kick(struct pipe *); +struct total_time_since { + u64 total; + u64 since; +}; + struct birdloop { node n; @@ -60,6 +65,9 @@ struct birdloop struct bird_thread *thread; +#define TIME_BY_SEC_SIZE 16 + u64 time_by_sec_ns[TIME_BY_SEC_SIZE]; + u64 last_time_finished_ns; u64 total_time_spent_ns; }; |