projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c34326b
)
bench: make io.c file path configurable
author
Ben Noordhuis
<info@bnoordhuis.nl>
Tue, 12 Feb 2013 18:37:30 +0000
(19:37 +0100)
committer
Ben Noordhuis
<info@bnoordhuis.nl>
Tue, 12 Feb 2013 18:38:29 +0000
(19:38 +0100)
benchmark/io.c
patch
|
blob
|
history
diff --git
a/benchmark/io.c
b/benchmark/io.c
index
a4f4575
..
66d90d5
100644
(file)
--- a/
benchmark/io.c
+++ b/
benchmark/io.c
@@
-14,7
+14,7
@@
static int c = 0;
static int tsize = 1000 * 1048576;
-static const char
path[]
= "/tmp/wt.dat";
+static const char
* path
= "/tmp/wt.dat";
static char buf[65536];
static uint64_t now(void) {
@@
-106,11
+106,13
@@
void cleanup() {
unlink(path);
}
-int main()
+int main(
int argc, char** argv
)
{
int i;
int bsizes[] = {1024, 4096, 8192, 16384, 32768, 65536, 0};
+ if (argc > 1) path = argv[1];
+
for (i = 0; bsizes[i] != 0; i++) {
writetest(tsize, bsizes[i]);
}