@@ -97,7 +97,7 @@ int main(int argc, char *argv[]) {
9797#endif
9898 std::vector<double > res;
9999 res.resize (iterations);
100- printf (" number of iterations %u \n " , iterations);
100+ if (!justdata) printf (" number of iterations %u \n " , iterations);
101101#if !defined(__linux__)
102102#define SQUASH_COUNTERS
103103 if (justdata) {
@@ -201,6 +201,7 @@ int main(int argc, char *argv[]) {
201201 return EXIT_FAILURE ;
202202 }
203203 double min_result = *min_element (res.begin (), res.end ());
204+ double speedinGBs = (p.size ()) / (min_result * 1000000000.0 );
204205#ifndef SQUASH_COUNTERS
205206 unsigned long total = cy0 + cy1 + cy2;
206207 if (justdata) {
@@ -221,8 +222,8 @@ int main(int argc, char *argv[]) {
221222 break ;
222223 }
223224 }
224- printf (" \" %s\"\t %f\t %f\t %f\t %f\n " , snewfile, cpb0, cpb1, cpb2,
225- cpbtotal);
225+ printf (" \" %s\"\t %f\t %f\t %f\t %f\t %f \ n" , snewfile, cpb0, cpb1, cpb2,
226+ cpbtotal, speedinGBs );
226227 free (newfile);
227228 } else {
228229 printf (" number of bytes %ld number of structural chars %u ratio %.3f\n " ,
@@ -263,9 +264,9 @@ int main(int argc, char *argv[]) {
263264#endif
264265 if (!justdata) {
265266 std::cout << " Min: " << min_result << " bytes read: " << p.size ()
266- << " Gigabytes/second: " << (p. size ()) / (min_result * 1000000000.0 )
267+ << " Gigabytes/second: " << speedinGBs
267268 << std::endl;
268- }
269+ }
269270 if (jsonoutput) {
270271 isok = isok && pj.printjson (std::cout);
271272 }
0 commit comments