source: benchmark/io/http/printer.hfa @ 137974ae

ADTast-experimentalpthread-emulationqualifiedEnum
Last change on this file since 137974ae was 137974ae, checked in by Thierry Delisle <tdelisle@…>, 2 years ago

Moved stats printer to it's own file and now using push-stats rather than pull

  • Property mode set to 100644
File size: 979 bytes
Line 
1#pragma once
2
3#include <stdint.h>
4
5#include <locks.hfa>
6#include <thread.hfa>
7
8extern const size_t zipf_sizes[];
9enum { zipf_cnts = 36, };
10
11struct sendfile_stats_t {
12        volatile uint64_t calls;
13        volatile uint64_t tries;
14        volatile uint64_t header;
15        volatile uint64_t splcin;
16        volatile uint64_t splcot;
17        struct {
18                volatile uint64_t calls;
19                volatile uint64_t bytes;
20        } avgrd[zipf_cnts];
21};
22
23void ?{}( sendfile_stats_t & this );
24
25void push(sendfile_stats_t & from, sendfile_stats_t & to);
26
27struct acceptor_stats_t {
28        volatile uint64_t creates;
29        volatile uint64_t accepts;
30        volatile uint64_t eagains;
31};
32
33void ?{}( acceptor_stats_t & this );
34
35void push(acceptor_stats_t & from, acceptor_stats_t & to);
36
37thread StatsPrinter {
38        struct {
39                __spinlock_t lock;
40                sendfile_stats_t send;
41                acceptor_stats_t accpt;
42        } stats;
43        condition_variable(fast_block_lock) var;
44};
45
46void ?{}( StatsPrinter & this, cluster & cl );
47void ^?{}( StatsPrinter & mutex this );
48
49extern StatsPrinter * stats_thrd;
Note: See TracBrowser for help on using the repository browser.