-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmeasurement.h
59 lines (42 loc) · 2.18 KB
/
measurement.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
This file is part of SystemConfidence.
Copyright (C) 2012, UT-Battelle, LLC.
This product includes software produced by UT-Battelle, LLC under Contract No.
DE-AC05-00OR22725 with the Department of Energy.
This program is free software; you can redistribute it and/or modify
it under the terms of the New BSD 3-clause software license (LICENSE).
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
LICENSE for more details.
For more information please contact the SystemConfidence developers at:
systemconfidence-info@googlegroups.com
*/
#ifndef _MEASUREMENT_H
#define _MEASUREMENT_H
#include "types.h"
/**************************************************************
* FUNCTIONS
**************************************************************/
extern inline int time2bin(test_p tst, double t);
extern inline double bin2time(test_p tst, int b);
extern inline double bin2midtime(test_p tst, int b);
/* measurement constructor and destructor */
measurement_p measurement_create(test_p tst, char *label);
measurement_p measurement_real_create(test_p tst, char *label, int histograms);
measurement_p measurement_destroy(measurement_p m);
/* calls the test specified in tst->test_type */
void measurement_collect(test_p tst, measurement_p m);
/* analysis functions */
void measurement_moments(test_p tst, histogram_p h, double center, double *m1, double *m2, double *m3, double *m4);
uint64_t measurement_samplecount(uint64_t *dist, int nbins);
void measurement_histogram(test_p tst, histogram_p h, double scale);
void measurement_analyze(test_p tst, measurement_p m, double scale);
/* output functions */
void measurement_serialize(test_p tst, measurement_p m, int writingRankID);
void measurement_write_cdf(test_p tst, measurement_p m);
void measurement_write_pdf(test_p tst, measurement_p m);
void measurement_write_hist(test_p tst, measurement_p m);
void measurement_fmthist(test_p tst, histogram_p h, char *label);
void measurement_print_header(FILE *outfile, test_p tst, char *measurement_label, char *hist_label);
#endif /* _MEASUREMENT_H */