Home » Modeling » VIATRA » Viatra evaluation benchmark, execution time
Viatra evaluation benchmark, execution time [message #1815077] |
Wed, 25 September 2019 09:05 |
Hana Mkaouar Messages: 7 Registered: January 2019 |
Junior Member |
|
|
Hi,
I am trying to evaluate Vitra incremental transformation (execution time). For example, I need to take the required time for an update or delete or adding a set of elements in the model. I am following the viatra benchmark specification (https://github.com/viatra/viatra-cps-benchmark/wiki/Benchmark-specification)
You propose this scenario for incremental M2MTransformation test:
Sequence [
EMFResourceInitialization, Generation, Initialization, M2MTransformation
Iteration (5 times) [
Modification
M2MTransformation (distinguished in results from the first run by adding a postfix) ] ]
So I tryied this
transformation.execute // for batch
modifymodel // update an element in the input model
timer.startMeasure
transformation.execute // for incremental transformation
timer.stopMeasure
But, this doesn't work ...
In Viatra plugins I found, for example, the ToolChainPerformanceIncrementalScenario class (https://github.com/viatra/viatra-cps-benchmark/blob/master/tests/com.incquerylabs.examples.cps.performance.tests/src/com/incquerylabs/examples/cps/performance/tests/config/scenarios/ToolChainPerformanceIncrementalScenario.xtend),
in which the iteration contains:
seq.addPhases(
new EMFResourceInitializationPhase("EMFResourceInitialization"),
benchmarkCase.getGenerationPhase("Generation"),
new InitializationPhase("Initialization"),
new M2MTransformationPhase("M2MTransformation1"),
new M2TTransformationPhase("M2TTransformation1"),
new ChangeMonitorInitializationPhase("ChangeMonitorInitialization"), iter)
Why the EMFResourceInitialization, Generation, Initialization phases are repeated every iteration ? It seems like you are repeating the same batch transformation.
How do you take the execution time for an update on an element in the model ? I mean, it is easy to take the batch transformation time
timer.startMeasure
transformation.execute
timer.stopMeasure
But, after the first batch transformation, is it possible to measure the time of model updates ?
Thank you.
|
|
|
Re: Viatra evaluation benchmark, execution time [message #1815080 is a reply to message #1815077] |
Wed, 25 September 2019 10:00 |
Zoltan Ujhelyi Messages: 392 Registered: July 2015 |
Senior Member |
|
|
Hi Hana,
an incremental transformation can be executed the same way regardless if a new model is to be created or an existing one updated, as the transformation ensures that at the final step the target model will be consistent to the source model. However, if only minor steps need to be executed (e.g. because the source model had only minor changes after the target model was generated), the execution time will be much shorter, as the transformation detects whether any given step needs to be executed or can be ignored.
This means, measuring the model update time can be done the same as the first one: wrapping the transformation execution with the measurement steps.
Hope this is helpful, if not, feel free to ask for clarifications.
Best regards,
Zoli
|
|
| | |
Re: Viatra evaluation benchmark, execution time [message #1816058 is a reply to message #1816028] |
Fri, 18 October 2019 09:39 |
Zoltan Ujhelyi Messages: 392 Registered: July 2015 |
Senior Member |
|
|
Hi Hana,
as you have noticed, event-driven transformations by default execute model updates together with the model modifications. To measure the modification time, you can do one of two things:
1. You could include the model updates time in the measurement of incremental updates. If your changes are trivial, then the update times would be mostly the transformation time; or you could do some baseline measurements were the transformation is not initialized but you are doing your measurements.
2. You could use a custom scheduler using the setSchedulerFactory() call of the transformation initialization that postpones the transformation execution until the measurements are started (e.g. it never sends a fire event, and after the measurements have started, you could call transformation.getExecutionSchema().startUnscheduledExecution() ). In this case, the update times of the VIATRA index will not be measured, but at least the concrete modifications steps will.
Hope this is helpful,
Zoltán
|
|
|
Goto Forum:
Current Time: Fri Mar 29 00:28:03 GMT 2024
Powered by FUDForum. Page generated in 0.02913 seconds
|