Lines Matching refs:state
30 void ReadWriteTest(benchmark::State& state, Fn f, bool buffered) { in ReadWriteTest() argument
31 size_t chunk_size = state.range(0); in ReadWriteTest()
41 while (state.KeepRunning()) { in ReadWriteTest()
45 state.SetBytesProcessed(int64_t(state.iterations()) * int64_t(chunk_size)); in ReadWriteTest()
50 void BM_stdio_fread(benchmark::State& state) { in BM_stdio_fread() argument
51 ReadWriteTest(state, fread, true); in BM_stdio_fread()
55 void BM_stdio_fwrite(benchmark::State& state) { in BM_stdio_fwrite() argument
56 ReadWriteTest(state, fwrite, true); in BM_stdio_fwrite()
60 void BM_stdio_fread_unbuffered(benchmark::State& state) { in BM_stdio_fread_unbuffered() argument
61 ReadWriteTest(state, fread, false); in BM_stdio_fread_unbuffered()
65 void BM_stdio_fwrite_unbuffered(benchmark::State& state) { in BM_stdio_fwrite_unbuffered() argument
66 ReadWriteTest(state, fwrite, false); in BM_stdio_fwrite_unbuffered()
70 static void FopenFgetsFclose(benchmark::State& state, bool no_locking) { in FopenFgetsFclose() argument
72 while (state.KeepRunning()) { in FopenFgetsFclose()
80 static void BM_stdio_fopen_fgets_fclose_locking(benchmark::State& state) { in BM_stdio_fopen_fgets_fclose_locking() argument
81 FopenFgetsFclose(state, false); in BM_stdio_fopen_fgets_fclose_locking()
85 void BM_stdio_fopen_fgets_fclose_no_locking(benchmark::State& state) { in BM_stdio_fopen_fgets_fclose_no_locking() argument
86 FopenFgetsFclose(state, true); in BM_stdio_fopen_fgets_fclose_no_locking()