source:
benchmark/mutex/upp.cc
@
b5629d8
Last change on this file since b5629d8 was b4107c8, checked in by , 5 years ago | |
---|---|
|
|
File size: 343 bytes |
Rev | Line | |
---|---|---|
[f54a0ab] | 1 | #include <cstdio> |
2 | ||
3 | #include "bench.h" | |
4 | ||
5 | _Monitor MyMonitor { | |
6 | public: | |
[9f0b975] | 7 | void __attribute__((noinline)) call() {} |
[f54a0ab] | 8 | }; |
9 | ||
[b4107c8] | 10 | int main( int argc, char * argv[] ) { |
11 | BENCH_START() | |
[f54a0ab] | 12 | MyMonitor m; |
13 | BENCH( | |
[b4107c8] | 14 | for ( size_t i = 0; i < times; i++ ) { |
[f54a0ab] | 15 | m.call(); |
16 | }, | |
17 | result | |
18 | ) | |
[b4107c8] | 19 | printf( "%g\n", result ); |
[dc33b5b] | 20 | } |
[b4107c8] | 21 | |
22 | // Local Variables: // | |
23 | // tab-width: 4 // | |
24 | // End: // |
Note: See TracBrowser
for help on using the repository browser.