diff options
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme')
2 files changed, 19 insertions, 3 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/GenerationTaskExecutor.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/GenerationTaskExecutor.xtend index 1f52c4b3..aa98e268 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/GenerationTaskExecutor.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/GenerationTaskExecutor.xtend | |||
@@ -184,6 +184,9 @@ class GenerationTaskExecutor { | |||
184 | 184 | ||
185 | console.writeMessage("Model generation started") | 185 | console.writeMessage("Model generation started") |
186 | for(run : 1..runs) { | 186 | for(run : 1..runs) { |
187 | if(run > 1) { | ||
188 | ScriptExecutor::restForMeasurements(console) | ||
189 | } | ||
187 | monitor.subTask('''Solving problem«IF runs>0» «run»/«runs»«ENDIF»''') | 190 | monitor.subTask('''Solving problem«IF runs>0» «run»/«runs»«ENDIF»''') |
188 | val visualisationProgressMonitor= new EclipseBasedProgressMonitor(monitor) | 191 | val visualisationProgressMonitor= new EclipseBasedProgressMonitor(monitor) |
189 | 192 | ||
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScriptExecutor.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScriptExecutor.xtend index c9ec68bb..6037cfbf 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScriptExecutor.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ScriptExecutor.xtend | |||
@@ -4,6 +4,7 @@ import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigRef | |||
4 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigSpecification | 4 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigSpecification |
5 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigurationScript | 5 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigurationScript |
6 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.CustomEntry | 6 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.CustomEntry |
7 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.DocumentLevelSpecification | ||
7 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.DocumentationEntry | 8 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.DocumentationEntry |
8 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.EPackageImport | 9 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.EPackageImport |
9 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.FileReference | 10 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.FileReference |
@@ -24,11 +25,10 @@ import hu.bme.mit.inf.dslreasoner.application.execution.util.ApplicationConfigur | |||
24 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel | 25 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel |
25 | import java.util.LinkedHashMap | 26 | import java.util.LinkedHashMap |
26 | import java.util.Optional | 27 | import java.util.Optional |
27 | import org.eclipse.emf.common.util.URI | ||
28 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.DocumentLevelSpecification | ||
29 | import org.eclipse.core.runtime.jobs.Job | ||
30 | import org.eclipse.core.runtime.IProgressMonitor | 28 | import org.eclipse.core.runtime.IProgressMonitor |
31 | import org.eclipse.core.runtime.Status | 29 | import org.eclipse.core.runtime.Status |
30 | import org.eclipse.core.runtime.jobs.Job | ||
31 | import org.eclipse.emf.common.util.URI | ||
32 | 32 | ||
33 | class ScriptExecutor { | 33 | class ScriptExecutor { |
34 | val parser = new ApplicationConfigurationParser | 34 | val parser = new ApplicationConfigurationParser |
@@ -58,6 +58,9 @@ class ScriptExecutor { | |||
58 | val tasks = script.commands.filter(Task) | 58 | val tasks = script.commands.filter(Task) |
59 | 59 | ||
60 | for(taskIndex : 0..<tasks.size) { | 60 | for(taskIndex : 0..<tasks.size) { |
61 | if(taskIndex>0) { | ||
62 | restForMeasurements(null) | ||
63 | } | ||
61 | val task = tasks.get(taskIndex) | 64 | val task = tasks.get(taskIndex) |
62 | monitor.beginTask('''Executing task«IF tasks.size>1» «taskIndex+1»«ENDIF»: «task.name»''',task.totalWork) | 65 | monitor.beginTask('''Executing task«IF tasks.size>1» «taskIndex+1»«ENDIF»: «task.name»''',task.totalWork) |
63 | task.execute(monitor) | 66 | task.execute(monitor) |
@@ -234,4 +237,14 @@ class ScriptExecutor { | |||
234 | } | 237 | } |
235 | } | 238 | } |
236 | } | 239 | } |
240 | static val boolean measuring = true | ||
241 | static def restForMeasurements(ScriptConsole console) { | ||
242 | if(measuring) { | ||
243 | if(console !== null) { | ||
244 | console.writeMessage('''Cleaning memory.''') | ||
245 | } | ||
246 | System.gc System.gc System.gc | ||
247 | Thread.sleep(2500) | ||
248 | } | ||
249 | } | ||
237 | } \ No newline at end of file | 250 | } \ No newline at end of file |