2 Copyright © 2008, The AROS Development Team. All rights reserved.
12 if((file
= fopen("T:__test__", "w")))
14 #define BUFSIZE 1000000
17 #define BENCHMARK(z, n, c) fwrite(buffer, BUFSIZE, sizeof(char), file);
18 BENCHMARK_BUFFER(fwrite
,100, BUFSIZE
);
21 fseek(file
, 0, SEEK_SET
);
23 #define BENCHMARK(z, n, c) fread(buffer, BUFSIZE, sizeof(char), file);
24 BENCHMARK_BUFFER(fread
,100, BUFSIZE
);
31 if((file
= fopen("T:__test__", "w")))
35 #define BENCHMARK(z, n, c) fwrite(buffer, 1, sizeof(char), file);
36 BENCHMARK_OPERATION(fwrite
,10000000);
39 fseek(file
, 0, SEEK_SET
);
41 #define BENCHMARK(z, n, c) fread(buffer, 1, sizeof(char), file);
42 BENCHMARK_OPERATION(fread
,10000000);
45 fseek(file
, 0, SEEK_SET
);
47 #define BENCHMARK(z, n, c) fseek(file, 1, SEEK_CUR);
48 BENCHMARK_OPERATION(fseek_cur
,10000);
51 #define BENCHMARK(z, n, c) fseek(file, c * 100 + n, SEEK_SET);
52 BENCHMARK_OPERATION(fseek_set
,10000);
55 #define BENCHMARK(z, n, c) fseek(file, c * 100 + n, SEEK_END);
56 BENCHMARK_OPERATION(fseek_end
,10000);