Statistics
| Branch: | Tag: | Revision:

sssimulator / stats.h @ master

History | View | Annotate | Download (790 Bytes)

1
#ifndef __STATS_H__
2
#define __STATS_H__ 1
3

    
4
#include <stdint.h>
5
#include "core.h"
6

    
7
#define PLAIN_STATS 0
8
#define CSV_STATS 1
9

    
10
struct stats {
11
        double elapsed_time;
12
        double avg_delay;
13
        double avg_max_delay;
14
        double max_delay;
15
        double loss;
16
        int last_non_active;
17
        uint32_t window;
18
};
19

    
20
int status_print(FILE *f, struct peer *p, int n, struct chunk * chunks, int c, int t);
21

    
22
int per_chunk_delay_analysis(FILE *stream, const struct chunk *chunks, int num_chunks, int num_peers);
23

    
24
void per_node_delay_analysis(FILE *stream, struct chunk *chunks, int num_chunks);
25

    
26
int chunk_stats_converge(struct stats** s, const struct chunk *chunks, int num_chunks, const struct peer * peers, int num_peers, double elapsed_time, uint32_t window);
27

    
28
void chunk_stats_print(const struct stats *s, int type);
29

    
30
#endif