repos
/
benchmark
/ annotate_shade
summary
|
shortlog
|
log
|
tree
|
commit
|
commitdiff
|
headdiff
|
annotate
|
headblob
|
headfilediff
|
filehistory
normal
|
plain
|
shade
|
zebra
add signal-slot benchmark & better graphs
Annotate for file signal_slot.cpp
2009-06-19 tobias
1
#include "signal_slot.h"
15:31:27 '
2
#include "signal_slot.moc"
'
3
'
4
#include "benchmark.h"
'
5
'
6
void
'
7
signal_object::my_slot()
'
8
{
'
9
}
'
10
'
11
extern "C" {
'
12
'
13
CL_SMOKE_BENCHMARK_EXPORT void
'
14
cl_smoke_benchmark_signal_slot(size_t iterations)
'
15
{
'
16
signal_object object;
'
17
bool ret = QObject::connect(&object, SIGNAL(my_signal()), &object, SLOT(my_slot()));
'
18
Q_ASSERT(ret);
'
19
'
20
for (size_t i=0; i<iterations; i++)
'
21
object.emit_my_signal();
'
22
}
'
23
'
24
} // extern "C"