Home | History | Annotate | Download | only in benchmarks

Lines Matching refs:state

38 void ReadWriteTest(benchmark::State& state, Fn f, bool buffered) {
39 size_t chunk_size = state.range(0);
49 while (state.KeepRunning()) {
55 state.SetBytesProcessed(int64_t(state.iterations()) * int64_t(chunk_size));
60 void BM_stdio_fread(benchmark::State& state) {
61 ReadWriteTest(state, fread, true);
65 void BM_stdio_fwrite(benchmark::State& state) {
66 ReadWriteTest(state, fwrite, true);
70 void BM_stdio_fread_unbuffered(benchmark::State& state) {
71 ReadWriteTest(state, fread, false);
75 void BM_stdio_fwrite_unbuffered(benchmark::State& state) {
76 ReadWriteTest(state, fwrite, false);
81 static void FopenFgetlnFclose(benchmark::State& state, bool no_locking) {
84 while (state.KeepRunning()) {
94 static void BM_stdio_fopen_fgetln_fclose_locking(benchmark::State& state) {
95 FopenFgetlnFclose(state, false);
99 void BM_stdio_fopen_fgetln_fclose_no_locking(benchmark::State& state) {
100 FopenFgetlnFclose(state, true);
105 static void FopenFgetsFclose(benchmark::State& state, bool no_locking) {
109 while (state.KeepRunning()) {
118 static void BM_stdio_fopen_fgets_fclose_locking(benchmark::State& state) {
119 FopenFgetsFclose(state, false);
123 void BM_stdio_fopen_fgets_fclose_no_locking(benchmark::State& state) {
124 FopenFgetsFclose(state, true);
128 static void FopenGetlineFclose(benchmark::State& state, bool no_locking) {
131 while (state.KeepRunning()) {
143 static void BM_stdio_fopen_getline_fclose_locking(benchmark::State& state) {
144 FopenGetlineFclose(state, false);
148 void BM_stdio_fopen_getline_fclose_no_locking(benchmark::State& state) {
149 FopenGetlineFclose(state, true);
153 static void FopenFgetcFclose(benchmark::State& state, bool no_locking) {
154 size_t nbytes = state.range(0);
155 while (state.KeepRunning()) {
166 static void BM_stdio_fopen_fgetc_fclose_locking(benchmark::State& state) {
167 FopenFgetcFclose(state, false);
171 void BM_stdio_fopen_fgetc_fclose_no_locking(benchmark::State& state) {
172 FopenFgetcFclose(state, true);
176 static void BM_stdio_printf_literal(benchmark::State& state) {
177 while (state.KeepRunning()) {
184 static void BM_stdio_printf_s(benchmark::State& state) {
185 while (state.KeepRunning()) {
193 static void BM_stdio_printf_d(benchmark::State& state) {
194 while (state.KeepRunning()) {
201 static void BM_stdio_printf_1$s(benchmark::State& state) {
202 while (state.KeepRunning()) {
210 static void BM_stdio_scanf_s(benchmark::State& state) {
211 while (state.KeepRunning()) {
218 static void BM_stdio_scanf_d(benchmark::State& state) {
219 while (state.KeepRunning()) {
227 static void BM_stdio_scanf_maps(benchmark::State& state) {
228 while (state.KeepRunning()) {
295 static void BM_stdio_scanf_maps_baseline(benchmark::State& state) {
296 while (state.KeepRunning()) {