celluloid-benchmark 0.0.6 → 0.0.7
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6046d943d61a24402d8b83c8d2d62e4e49c90a15
|
4
|
+
data.tar.gz: eeb6a22f1182a3b7dad35ed9f77caf6798535441
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bf7cadab5fceaa9d674968641cfa488c27050dea7da25af91b59c583c1d502b4c0ecf4e54b9905f00deb8486e170e1e6c22cbb2e64f4d84924c82b6762fe272
|
7
|
+
data.tar.gz: 431db7bec3237ad3a9343e99a68b77e8b9765eadf59e858dda99d27ca1cbe479e83e879ff815687a2373b385bec1b4ee0d0daa2bcd3e11dfc03b77731aa4aec7
|
@@ -3,13 +3,13 @@ module CelluloidBenchmark
|
|
3
3
|
def random_data(key)
|
4
4
|
data_source(key).sample
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
def data_sources
|
8
8
|
@data_sources ||= Hash.new do |hash, key|
|
9
|
-
hash[key] = File.readlines("tmp/data/#{key}s.csv")
|
9
|
+
hash[key] = File.readlines("tmp/data/#{key}s.csv").map(&:strip)
|
10
10
|
end
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
def data_sources=(hash)
|
14
14
|
@data_sources = hash
|
15
15
|
end
|
@@ -8,8 +8,8 @@ module CelluloidBenchmark
|
|
8
8
|
class Runner
|
9
9
|
def self.run(session_path, duration = 10)
|
10
10
|
raise("session_path is required") unless session_path
|
11
|
-
raise("'#{session_path}' does not exist")
|
12
|
-
|
11
|
+
raise("'#{session_path}' does not exist") unless File.exists?(session_path)
|
12
|
+
|
13
13
|
visitor_group = VisitorGroup.run!
|
14
14
|
benchmark_run = Celluloid::Actor[:benchmark_run]
|
15
15
|
|
@@ -20,7 +20,7 @@ module CelluloidBenchmark
|
|
20
20
|
|
21
21
|
benchmark_run
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
def self.run_sessions(session_path, benchmark_run, duration)
|
25
25
|
session = File.read(session_path)
|
26
26
|
visitors = Celluloid::Actor[:visitor_pool]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: celluloid-benchmark
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Willson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-05-13 00:00:00 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: celluloid
|