summaryrefslogtreecommitdiffstats
path: root/contrib/benchmarks/uscxml
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2017-07-05 08:05:55 (GMT)
committerStefan Radomski <github@mintwerk.de>2017-07-05 08:05:55 (GMT)
commitbfefa5fd44b9ed1491612f26b099db8ad624247b (patch)
treeca4313ced9adb3288056c3e7ddf121e614cf3c2b /contrib/benchmarks/uscxml
parent04121c58222c95b1d808a1556b5110832a1c1119 (diff)
downloaduscxml-bfefa5fd44b9ed1491612f26b099db8ad624247b.zip
uscxml-bfefa5fd44b9ed1491612f26b099db8ad624247b.tar.gz
uscxml-bfefa5fd44b9ed1491612f26b099db8ad624247b.tar.bz2
More performant Monitors
Breaks InterpreterMonitor API, Interpreter argument is substituted by sessionId. Use Intererpreter::fromSessionId to retrieve actual session when required.
Diffstat (limited to 'contrib/benchmarks/uscxml')
-rw-r--r--contrib/benchmarks/uscxml/statesPerSecond.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/benchmarks/uscxml/statesPerSecond.cpp b/contrib/benchmarks/uscxml/statesPerSecond.cpp
index f6e62e6..6b81bbd 100644
--- a/contrib/benchmarks/uscxml/statesPerSecond.cpp
+++ b/contrib/benchmarks/uscxml/statesPerSecond.cpp
@@ -18,8 +18,8 @@ system_clock::time_point endTime;
class PerfMon : public InterpreterMonitor {
public:
- virtual void beforeEnteringState(Interpreter& interpreter, const XERCESC_NS::DOMElement* state) {
- if (HAS_ATTR(state, X("id")) && ATTR(state, X("id")) == "mark") {
+ virtual void beforeEnteringState(const std::string& sessionId, const std::string& stateName, const XERCESC_NS::DOMElement* state) {
+ if (stateName == "mark") {
iterations++;
now = system_clock::now();
if (now > report) {
@@ -42,9 +42,9 @@ int main(int argc, char *argv[])
ActionLanguage al;
if (argc > 2) {
if (std::string(argv[2]) == "large") {
- al.microStepper = Factory::getInstance()->createMicroStepper("large", (MicroStepCallbacks*)sc);
+ al.microStepper = Factory::getInstance()->createMicroStepper("large", (MicroStepCallbacks*)(sc.getImpl().get()));
} else {
- al.microStepper = Factory::getInstance()->createMicroStepper("fast", (MicroStepCallbacks*)sc);
+ al.microStepper = Factory::getInstance()->createMicroStepper("fast", (MicroStepCallbacks*)(sc.getImpl().get()));
}
}
sc.setActionLanguage(al);