source: benchmark/io/http/printer.hfa@ a8b87d3

ADT ast-experimental pthread-emulation qualifiedEnum
Last change on this file since a8b87d3 was 329e26a, checked in by Thierry Delisle <tdelisle@…>, 3 years ago

Re-instated the isolate/multi-cluster option.

  • Property mode set to 100644
File size: 1.0 KB
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
37struct ServerCluster {
38 cluster self;
39 processor * procs;
40};
41
42thread StatsPrinter {
43 struct {
44 __spinlock_t lock;
45 sendfile_stats_t send;
46 acceptor_stats_t accpt;
47 } stats;
48 condition_variable(fast_block_lock) var;
49 ServerCluster * cl;
50};
51
52void ?{}( StatsPrinter & this, ServerCluster * cl );
53void ^?{}( StatsPrinter & mutex this );
54
55extern StatsPrinter * stats_thrd;
Note: See TracBrowser for help on using the repository browser.