pgtesttiming_int64format.patch

application/octet-stream

Filename: pgtesttiming_int64format.patch
Type: application/octet-stream
Part: 0
Message: Re: [COMMITTERS] pgsql: pg_test_timing utility, to measure clock monotonicity and timing

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: context
File+
contrib/pg_test_timing/pg_test_timing.c 3 0
*** a/contrib/pg_test_timing/pg_test_timing.c
--- b/contrib/pg_test_timing/pg_test_timing.c
***************
*** 107,112 **** test_timing(int32 duration)
--- 107,113 ----
  	instr_time start_time, end_time, temp;
  
  	static int64 histogram[32];
+ 	char	buf[100];
  
  	total_time = duration > 0 ? duration * 1000000 : 0;
  
***************
*** 155,161 **** test_timing(int32 duration)
          if (found || histogram[i])
          {
              found = 1;
!             printf("%9ld: %10ld %8.5f%%\n", 1l << i, histogram[i],
                  (double) histogram[i] * 100 / loop_count);
          }
      }
--- 156,163 ----
          if (found || histogram[i])
          {
              found = 1;
! 			snprintf(buf, sizeof(buf), INT64_FORMAT, histogram[i]);
!             printf("%9ld: %10s %8.5f%%\n", 1l << i, buf,
                  (double) histogram[i] * 100 / loop_count);
          }
      }