This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Allow multiple input domains to be run in the same benchmark program
- From: Andreas Jaeger <aj at suse dot com>
- To: libc-alpha at sourceware dot org
- Date: Tue, 30 Apr 2013 09:38:57 +0200
- Subject: Re: [PATCH] Allow multiple input domains to be run in the same benchmark program
- References: <20130424143007 dot GH14810 at spoyarek dot pnq dot redhat dot com>
This is fine, but please fix the typo I noticed,
Thanks,
Andreas
diff --git a/benchtests/bench-skeleton.c b/benchtests/bench-skeleton.cindex bbd151b..f5dba21 100644
--- a/benchtests/bench-skeleton.c
+++ b/benchtests/bench-skeleton.c
@@ -30,7 +30,6 @@ int
main (int argc, char **argv)
{
unsigned long i, k;
- uint64_t total = 0, max = 0, min = 0x7fffffffffffffff;
struct timespec start, end, runtime;
memset (&runtime, 0, sizeof (runtime));
@@ -45,53 +44,57 @@ main (int argc, char **argv)
but it's better than having nothing at all. */
unsigned long iters = 1000 * start.tv_nsec;
- /* Run for approxmately DURATION seconds. */
- clock_gettime (CLOCK_MONOTONIC_RAW, &runtime);
- runtime.tv_sec += DURATION;
-
- double d_total_i = 0;
- while (1)
+ for (int v = 0; v < NUM_VARIANTS; v++)
{
- for (i = 0; i < NUM_SAMPLES; i++)
- {
- clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &start);
- for (k = 0; k < iters; k++)
- BENCH_FUNC(i);
- clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &end);
+ /* Run for approxmately DURATION seconds. */
Typo: approximately
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126