source: benchmark/io/http/printer.hfa@ 3a7aa94

Last change on this file since 3a7aa94 was 32d1383, checked in by Thierry Delisle <tdelisle@…>, 3 years ago

Committing http server when I know it works

  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[137974ae]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 {
[ae020ea]12 volatile uint64_t maxfd;
13 volatile uint64_t close;
[32d1383]14 volatile uint64_t error;
[137974ae]15 volatile uint64_t calls;
[32d1383]16 volatile uint64_t eagain;
[137974ae]17 volatile uint64_t tries;
18 volatile uint64_t header;
19 volatile uint64_t splcin;
20 volatile uint64_t splcot;
21 struct {
22 volatile uint64_t calls;
23 volatile uint64_t bytes;
24 } avgrd[zipf_cnts];
25};
26
27void ?{}( sendfile_stats_t & this );
28
29void push(sendfile_stats_t & from, sendfile_stats_t & to);
30
31struct acceptor_stats_t {
32 volatile uint64_t creates;
33 volatile uint64_t accepts;
34 volatile uint64_t eagains;
35};
36
37void ?{}( acceptor_stats_t & this );
38
39void push(acceptor_stats_t & from, acceptor_stats_t & to);
40
[329e26a]41struct ServerCluster {
42 cluster self;
43 processor * procs;
44};
45
[137974ae]46thread StatsPrinter {
47 struct {
48 __spinlock_t lock;
49 sendfile_stats_t send;
50 acceptor_stats_t accpt;
51 } stats;
52 condition_variable(fast_block_lock) var;
[329e26a]53 ServerCluster * cl;
[137974ae]54};
55
[329e26a]56void ?{}( StatsPrinter & this, ServerCluster * cl );
[137974ae]57void ^?{}( StatsPrinter & mutex this );
58
59extern StatsPrinter * stats_thrd;
Note: See TracBrowser for help on using the repository browser.