Statistics
| Branch: | Tag: | Revision:

sssimulator / stats.h @ master

History | View | Annotate | Download (790 Bytes)

1 32c9a7bc Luca Baldesi
#ifndef __STATS_H__
2
#define __STATS_H__ 1
3
4 f850347b Luca Baldesi
#include <stdint.h>
5
#include "core.h"
6
7 32c9a7bc Luca Baldesi
#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 f850347b Luca Baldesi
        uint32_t window;
18 32c9a7bc Luca Baldesi
};
19
20 52770a8f Luca Baldesi
int status_print(FILE *f, struct peer *p, int n, struct chunk * chunks, int c, int t);
21 32c9a7bc Luca Baldesi
22
int per_chunk_delay_analysis(FILE *stream, const struct chunk *chunks, int num_chunks, int num_peers);
23
24 86681e55 luca
void per_node_delay_analysis(FILE *stream, struct chunk *chunks, int num_chunks);
25 32c9a7bc Luca Baldesi
26 f850347b Luca Baldesi
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 32c9a7bc Luca Baldesi
28
void chunk_stats_print(const struct stats *s, int type);
29
30
#endif