source: benchmark/io/http/printer.hfa@ 80d16f8

ADT ast-experimental pthread-emulation
Last change on this file since 80d16f8 was ae020ea, checked in by Thierry Delisle <tdelisle@…>, 3 years ago

Printer now prints max fd and open/closed/live connections.

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