batch_experiment 2.1.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/lib/batch_experiment.rb +10 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 193dd9c4b80ffc484d36387cf6f5a890fb94fc9f
|
4
|
+
data.tar.gz: 964b09bb90d7561781aea92aedceea75d51fa39d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7958d2968951167115da3b6a44ed3760b381a55e994a72420d6ea3039a9c8281644515a38436f766f3bc7dd20f8f467ee95a9ff906eede69842bdeb22c846c77
|
7
|
+
data.tar.gz: bd359497c5eb6878ad90178b1909533917fc6c67dd0be709ded77baccb4705ebf4976873d17cc866c058d13d390bc6528233bceacf0054ba5517a92e4ee483dc
|
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--no-private
|
data/lib/batch_experiment.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'childprocess'
|
2
2
|
require 'pathname'
|
3
|
+
require 'socket'
|
3
4
|
|
4
5
|
# The main module, the two main utility methods offered are ::batch and
|
5
6
|
# ::experiment.
|
@@ -97,6 +98,11 @@ module BatchExperiment
|
|
97
98
|
free_cpus.push(job[:cpu])
|
98
99
|
File.delete(job[:lockfname])
|
99
100
|
comms_executed << job[:command]
|
101
|
+
out = job[:out_file]
|
102
|
+
out.write("\ncommand: " + job[:command])
|
103
|
+
out.write("\ndate_before: " + job[:date_before].utc.to_s)
|
104
|
+
out.write("\ndate_after: " + Time.now.utc.to_s)
|
105
|
+
out.write("\nhostname: " + Socket.gethostname)
|
100
106
|
end
|
101
107
|
exited # bool returned to delete_if
|
102
108
|
end
|
@@ -246,13 +252,16 @@ module BatchExperiment
|
|
246
252
|
cproc.io.stdout = out
|
247
253
|
cproc.io.stderr = err
|
248
254
|
|
255
|
+
date_before = Time.now
|
249
256
|
cproc.start
|
250
257
|
|
251
258
|
comms_running << {
|
252
259
|
proc: cproc,
|
253
260
|
cpu: cpu,
|
254
261
|
lockfname: lockfname,
|
255
|
-
command: command
|
262
|
+
command: command,
|
263
|
+
date_before: date_before,
|
264
|
+
out_file: out,
|
256
265
|
}
|
257
266
|
|
258
267
|
# The lock file now stores the process pid for debug reasons.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: batch_experiment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrique Becker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: childprocess
|
@@ -30,6 +30,7 @@ executables: []
|
|
30
30
|
extensions: []
|
31
31
|
extra_rdoc_files: []
|
32
32
|
files:
|
33
|
+
- ".yardopts"
|
33
34
|
- README.md
|
34
35
|
- examples/bible.txt
|
35
36
|
- examples/debug_batch.rb
|
@@ -45,8 +46,7 @@ licenses:
|
|
45
46
|
- Unlicense
|
46
47
|
metadata: {}
|
47
48
|
post_install_message:
|
48
|
-
rdoc_options:
|
49
|
-
- "--no-private"
|
49
|
+
rdoc_options: []
|
50
50
|
require_paths:
|
51
51
|
- lib
|
52
52
|
required_ruby_version: !ruby/object:Gem::Requirement
|