20 #ifndef __PERCYSTATS_H__
21 #define __PERCYSTATS_H__
29 extern void sub_timevals (timeval& result,
const timeval& t1,
const timeval& t2);
30 extern std::ostream&
operator<< (std::ostream& os,
const timeval& t);
34 nqueries_t batch_size;
35 nqueries_t blocks_per_query;
39 timeval encode_start_time;
40 timeval encode_done_time;
41 timeval ctos_start_time;
42 timeval ctos_done_time;
43 timeval stoc_start_time;
44 timeval stoc_done_time;
45 timeval decode_start_time;
46 timeval decode_done_time;
54 bool num_unsuccessful;
57 nqueries_t strassen_level_reached;
60 encode_start_time(), encode_done_time(), ctos_start_time(),
61 ctos_done_time(), stoc_start_time(), stoc_done_time(),
62 decode_start_time(), decode_done_time(), end_time(), ctos_bytes(),
63 stoc_bytes(), num_unsuccessful(), strassen_level_reached() {}
69 PercyStats (std::ostream& os,
const char * appendix = NULL);
72 void clear_batches () { query_batches.clear(); }
74 nqueries_t start_query_batch (nqueries_t batch_size,
75 nqueries_t blocks_per_query = 1);
76 bool encode_start (nqueries_t batch_number);
77 bool encode_done (nqueries_t batch_number);
78 bool client_to_server_start (nqueries_t batch_number);
79 bool client_to_server_done (nqueries_t batch_number, dbsize_t bytes_sent);
80 bool server_to_client_start (nqueries_t batch_number);
81 bool server_to_client_done (nqueries_t batch_number, dbsize_t bytes_sent);
82 bool decode_start (nqueries_t batch_number);
83 bool decode_done (nqueries_t batch_number, nqueries_t num_unsuccessful = 0);
84 bool strassen_level_reached (nqueries_t batch_number,
85 nqueries_t strassen_level_reached = 0);
86 bool finish_query_batch (nqueries_t batch_number,
bool print_head =
false);
88 bool time_communication_separately ()
const {
return time_communication; }
90 virtual void print_header () = 0;
93 nqueries_t next_batch_number;
96 std::map<nqueries_t, QueryBatchStats> query_batches;
99 virtual bool print (nqueries_t batch_number,
bool print_head =
false) = 0;
100 bool print_and_delete (nqueries_t batch_number,
bool print_head =
false);
101 void print_all (
bool print_head =
false);
104 const char * appendix;
105 bool time_communication;
112 const char * appendix = NULL);
114 const char * appendix = NULL);
117 virtual void print_header ();
120 virtual bool print (nqueries_t batch_number,
bool print_head =
false);
129 const char * appendix = NULL);
131 const char * appendix = NULL);
134 virtual void print_header ();
137 virtual bool print (nqueries_t batch_number,
bool print_head =
false);
Client parameters.
Definition: percyparams.h:189
std::ostream & operator<<(std::ostream &os, PercyMode mode)
Prints a PercyMode string to a stream.
Definition: percystats.h:66
This header contains typedefs for seamless switching between 32- and 64-bit builds of Percy++...
Definition: percystats.h:109
Server parameters.
Definition: percyparams.h:251
Definition: percystats.h:126
Defines the basic structure of protocol parameters (PercyParams), client parameters (PercyClientParam...
Definition: percystats.h:32