https://github.com/openmole/hybrid_environment
External openmole plugin, listening to the givens environments, and saving data and statistics about them.
https://github.com/openmole/hybrid_environment
Last synced: about 1 year ago
JSON representation
External openmole plugin, listening to the givens environments, and saving data and statistics about them.
- Host: GitHub
- URL: https://github.com/openmole/hybrid_environment
- Owner: openmole
- Created: 2015-07-07T14:42:47.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-10T17:17:12.000Z (over 10 years ago)
- Last Synced: 2025-02-01T01:56:02.330Z (over 1 year ago)
- Language: Scala
- Size: 301 KB
- Stars: 1
- Watchers: 10
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HybridEnvironment
External openmole plugin, listening to the givens environments, and saving data and statistics about them.
## HOW TO USE IT
* COMPILE.
* `sbt osgi-bundle`.
* MAY NEED TO DO A `sbt publish-local` IN OPENMOLE DIRECTORY FIRST.
* JARJAR WILL BE IN `./target/scala-2.11/` NAMED `environment_listener_2.11-1.0.jar`
* MODIFY YOUR SCRIPT.
* ADD `import environment_listener.Listener`.
* ADD `Listener.registerEnvironment()` FOR EACH ENVIRONMENT YOU WANT TO MONITOR.
* ADD `Listener.csv_path = ""` IF YOU DON'T WANT THE DEFAULT LOCATION
* WHICH IS `/tmp/openmole.csv`
* ADD `Listener.startMonitoring` ONCE YOU'RE GOOD.
* SPECIFY THE PATH TO JARJAR
* `openmole -p -s `
* ???
* PROFIT

## EXAMPLE
```Scala
import environment_listener.Listener
// Define the variables that are transmitted between the tasks
val seed = Val[Long]
val pi = Val[Double]
val piAvg = Val[Double]
STUFF
// Define the execution environment, here it is a local execution environment with 4 threads
val env = SSHEnvironment(
"Arthur",
"kaamelott",
nbSlots=1
)
Listener.registerEnvironment(env)
Listener.csv_path = "/home/Arthur/poulette.csv"
Listener.startMonitoring()
// Define and start the workflow
exploration -< (model on env hook ToStringHook()) >- (average hook ToStringHook())
```
WILL PRODUCE
```CSV
timezone, env_kind, env_name, memory, sec, min, core, hour, day_w, day_m, month, waitingTime, execTime, totalTime, failed,
+0100, SSHEnvironment, Arthur@kaamelott, 0, 23, 34, 4, 16, 5, 29, 7, 0, 0, 64, false,
+0100, SSHEnvironment, Arthur@kaamelott, 0, 24, 34, 4, 16, 5, 29, 7, 0, 0, 63, false,
+0100, SSHEnvironment, Arthur@kaamelott, 0, 24, 34, 4, 16, 5, 29, 7, 0, 0, 63, false,
+0100, SSHEnvironment, Arthur@kaamelott, 0, 19, 35, 4, 16, 5, 29, 7, 10, 42, 52, false,
...
```