Lines Matching refs:bench

128 with open("BenchmarkGen.h", 'w') as bench:
129 print >>bench, """/*
172 print >>bench, "char* buf = (char*) malloc(%d);" % (bufsize)
185 print >>bench, "if (!checkpoint(%d)) return -1;" % (50 + ((i * 50) / total))
192 print >>bench, "int",
198 print >>bench, '%s = TEMP_FAILURE_RETRY(open("file%s", %s%s));' \
205 print >>bench, 'close(%s);' % (handle)
210 … print >>bench, 'TEMP_FAILURE_RETRY(lseek(%s, %s, %s));' % (handle, e.args[1], e.args[2])
215 … print >>bench, 'TEMP_FAILURE_RETRY(lseek(%s, %s, %s));' % (handle, e.args[1], e.args[3])
223 print >>bench, 'TEMP_FAILURE_RETRY(read(%s, buf, %d));' % (handle, count)
232 print >>bench, 'TEMP_FAILURE_RETRY(write(%s, buf, %d));' % (handle, count)
240 … print >>bench, 'TEMP_FAILURE_RETRY(pread(%s, buf, %d, %s));' % (handle, count, e.args[3])
248 … print >>bench, 'TEMP_FAILURE_RETRY(pwrite(%s, buf, %d, %s));' % (handle, count, e.args[3])
254 print >>bench, 'TEMP_FAILURE_RETRY(fsync(%s));' % (handle)
260 print >>bench, 'TEMP_FAILURE_RETRY(fdatasync(%s));' % (handle)
269 … print >>bench, 'TEMP_FAILURE_RETRY(pread(%s, buf, %s, %s)); // mmap2' % (handle, count, offset)
273 print >>bench, 'close(%s);' % (handle)
275 print >>bench, """
317 print >>bench, "if (!checkpoint(%d)) return -1;" % ((i * 50) / total)
319 print >>bench, 'res |= CreateFile("file%s", %d);' % (f.ident, f.size)
321 print >>bench, """
330 print >>bench, 'res |= unlink("file%s");' % (f.ident)
332 print >>bench, """
337 print >>bench, """return "r%d:w%d:s%d";""" % (nread, nwrite, nsync)
338 print >>bench, """}