24#define NUM_DIRECT 10000
37main(
int argc,
char *argv[])
69 if (
strcmp(argv[1],
"--help") == 0 ||
strcmp(argv[1],
"-?") == 0)
74 if (
strcmp(argv[1],
"--version") == 0 ||
strcmp(argv[1],
"-V") == 0)
90 if (endptr ==
optarg || *endptr !=
'\0' ||
112 if (endptr ==
optarg || *endptr !=
'\0' ||
errno != 0)
139 _(
"%s: too many command-line arguments (first is \"%s\")\n"),
147 "Testing timing overhead for %u seconds.\n",
228 printf(
_(
"Average loop time including overhead: %0.2f ns\n"),
240 const char *
header2 =
_(
"% of total");
241 const char *
header3 =
_(
"running %");
256 len2 =
Max(10, len2);
260 printf(
_(
"Histogram of timing durations:\n"));
261 printf(
"%*s %*s %*s %*s\n",
273 printf(
"%*ld %*.4f %*.4f %*lld\n",
281 printf(
"%*s %*s %*s %*s\n",
306 printf(
"%*d %*.4f %*.4f %*lld\n",
322 printf(
"%*d %*.4f %*.4f %*lld\n",
#define ngettext(s, p, n)
#define PG_TEXTDOMAIN(domain)
void set_pglocale_pgservice(const char *argv0, const char *app)
#define fprintf(file, fmt, msg)
int getopt_long(int argc, char *const argv[], const char *optstring, const struct option *longopts, int *longindex)
#define required_argument
#define INSTR_TIME_SET_CURRENT(t)
#define INSTR_TIME_GET_NANOSEC(t)
#define INSTR_TIME_GET_DOUBLE(t)
#define INSTR_TIME_SUBTRACT(x, y)
static int pg_leftmost_one_pos32(uint32 word)
PGDLLIMPORT char * optarg
static long long int histogram[32]
static int32 largest_diff
static void handle_args(int argc, char *argv[])
static long long int largest_diff_count
static uint64 test_timing(unsigned int duration)
static const char * progname
static unsigned int test_duration
static long long int direct_histogram[NUM_DIRECT]
const char * get_progname(const char *argv0)