diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2016-07-27 15:09:11 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2016-07-27 15:09:11 +0000 |
commit | 56bf85096cc89f91d28671b5d93b4172240263bc (patch) | |
tree | 0574ce9eee45d627f943b80b2445882a762b52af /benchmarks/bonnie | |
parent | 26b078f5434c79c09183a623d0c9897d12fd26c9 (diff) |
Notes
Diffstat (limited to 'benchmarks/bonnie')
-rw-r--r-- | benchmarks/bonnie/files/patch-Bonnie.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/benchmarks/bonnie/files/patch-Bonnie.c b/benchmarks/bonnie/files/patch-Bonnie.c index 2ac462d48750..f1473d3ab00f 100644 --- a/benchmarks/bonnie/files/patch-Bonnie.c +++ b/benchmarks/bonnie/files/patch-Bonnie.c @@ -1,5 +1,5 @@ ---- Bonnie.c.orig 1996-08-29 01:23:49.000000000 +0900 -+++ Bonnie.c 2009-08-21 23:05:39.000000000 +0900 +--- Bonnie.c.orig 1996-08-28 16:23:49 UTC ++++ Bonnie.c @@ -25,6 +25,9 @@ #include <unistd.h> @@ -19,7 +19,7 @@ /* labels for the tests, used as an array index */ typedef enum -@@ -87,7 +90,7 @@ +@@ -87,7 +90,7 @@ static double delta[(int) TestCount][2]; static double last_cpustamp = 0.0; /* for computing delta-t */ static double last_timestamp = 0.0; /* for computing delta-t */ @@ -28,7 +28,7 @@ int argc, char * argv[]) { -@@ -146,7 +149,7 @@ +@@ -146,7 +149,7 @@ main( /* size is in meg, rounded down to multiple of Chunk */ size *= (1024 * 1024); size = Chunk * (size / Chunk); @@ -37,7 +37,7 @@ /* Fill up a file, writing it a char at a time with the stdio putc() call */ fprintf(stderr, "Writing with putc()..."); -@@ -167,7 +170,7 @@ +@@ -167,7 +170,7 @@ main( /* Now read & rewrite it using block I/O. Dirty one word in each block */ newfile(name, &fd, &stream, 0); @@ -46,7 +46,7 @@ io_error("lseek(2) before rewrite"); fprintf(stderr, "Rewriting..."); timestamp(); -@@ -179,7 +182,7 @@ +@@ -179,7 +182,7 @@ main( if (bufindex == Chunk / IntSize) bufindex = 0; buf[bufindex++]++; @@ -55,7 +55,7 @@ io_error("relative lseek(2)"); if (write(fd, (char *) buf, words) == -1) io_error("re write(2)"); -@@ -235,7 +238,7 @@ +@@ -235,7 +238,7 @@ main( /* Now suck it in, Chunk at a time, as fast as we can */ newfile(name, &fd, &stream, 0); @@ -64,7 +64,7 @@ io_error("lseek before read"); fprintf(stderr, "Reading intelligently..."); timestamp(); -@@ -288,6 +291,7 @@ +@@ -288,6 +291,7 @@ main( { /* child process */ /* set up and wait for the go-ahead */ @@ -72,7 +72,7 @@ close(seek_feedback[0]); close(seek_control[1]); newfile(name, &fd, &stream, 0); -@@ -303,7 +307,12 @@ +@@ -303,7 +307,12 @@ main( /* loop until we read a 0 ticket back from our parent */ while(seek_tickets[0]) { /* until Mom says stop */ @@ -86,7 +86,7 @@ ((lseek_count++ % UpdateSeek) == 0)); if (read(seek_control[0], seek_tickets, 1) != 1) io_error("read ticket"); -@@ -413,7 +422,7 @@ +@@ -413,7 +422,7 @@ report( printf("K/sec %%CPU K/sec %%CPU K/sec %%CPU K/sec %%CPU K/sec "); printf("%%CPU /sec %%CPU\n"); @@ -95,7 +95,7 @@ printf("%5d %4.1f %5d %4.1f %5d %4.1f ", (int) (((double) size) / (delta[(int) Putc][Elapsed] * 1024.0)), delta[(int) Putc][CPU] / delta[(int) Putc][Elapsed] * 100.0, -@@ -529,7 +538,10 @@ +@@ -529,7 +538,10 @@ io_error(char * message) { char buf[Chunk]; @@ -107,7 +107,7 @@ perror(buf); exit(1); } -@@ -557,7 +569,7 @@ +@@ -557,7 +569,7 @@ doseek( off_t size; probe = where * Chunk; @@ -116,7 +116,7 @@ io_error("lseek in doseek"); if ((size = read(fd, (char *) buf, Chunk)) == -1) io_error("read in doseek"); -@@ -568,7 +580,7 @@ +@@ -568,7 +580,7 @@ doseek( /* touch a word */ buf[((int) random() % (size/IntSize - 2)) + 1]--; |