sampling_prof 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sampling_prof.jar +0 -0
- data/lib/sampling_prof.rb +13 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 059734e60c5ca68ae9aee85c3903317177a9e8fd
|
4
|
+
data.tar.gz: dd0da433f98ac0552d97d5053a6de3dca5212db4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a3bc208fdb609d09ecce6cb69f3577577bf01add12da196ba54e7820a57bfc41670d91abe4a4cf93fbee7242d3061564a2cb71a992019b4460d98b40bb0001f
|
7
|
+
data.tar.gz: 2ad8352836bf838e9b51d6a2de42582a2e9cc315a513d9c36a6150313fb360f1fdc1041605d8c7145f984c28498cbfb08928afcab0c7f2694c4c979fd8d479e7
|
data/lib/sampling_prof.jar
CHANGED
Binary file
|
data/lib/sampling_prof.rb
CHANGED
@@ -9,13 +9,19 @@ class SamplingProf
|
|
9
9
|
|
10
10
|
attr_writer :output_file
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
self.
|
12
|
+
# options:
|
13
|
+
# sampling_interval: default to 0.1 second
|
14
|
+
# multithreading: default to false
|
15
|
+
# output_interval: default to (multithreading ? 60 : nil)
|
16
|
+
# &output_handler: default to write into output_file
|
17
|
+
def initialize(*args, &output_handler)
|
18
|
+
self.sampling_interval = args[0] || 0.1
|
19
|
+
self.multithreading = args[1] || false
|
20
|
+
if args.length > 2
|
21
|
+
self.output_interval = args[2]
|
22
|
+
else
|
23
|
+
self.output_interval = multithreading ? 60 : nil
|
24
|
+
end
|
19
25
|
self.output_handler = block_given? ? output_handler : default_output_handler
|
20
26
|
internal_initialize if respond_to?(:internal_initialize)
|
21
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sampling_prof
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xiao Li
|
@@ -65,6 +65,6 @@ rubyforge_project:
|
|
65
65
|
rubygems_version: 2.1.9
|
66
66
|
signing_key:
|
67
67
|
specification_version: 4
|
68
|
-
summary: Simple sampling profiler
|
68
|
+
summary: Simple sampling profiler for ruby
|
69
69
|
test_files: []
|
70
70
|
|