sampling_prof 0.4.3 → 0.4.4
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 +7 -7
- data/lib/sampling_prof.jar +0 -0
- data/lib/sampling_prof.rb +1 -2
- data/lib/sampling_prof/internal.rb +2 -4
- metadata +53 -52
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0794324a024699df824bed72d7ce8b80d886ea80
|
4
|
+
data.tar.gz: f0255164047aaf6d2a9161d0c3a7526d104cac93
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d52a265a89052c49eea16e4dbd74d3e2efe7f66edafe8be016e0f4aa0ec1dba8e2604db45af20bdc91ceb508d05cea3a607df58560e0c8e5016f65179b1c49b2
|
7
|
+
data.tar.gz: edc8d90595a712a04726364829e752bfa400b78be5cffeaee621c09d9718bc888fc969024c60eb150a897d86cd3fcacce07125c548f7e303ed75432a42a00448
|
data/lib/sampling_prof.jar
CHANGED
Binary file
|
data/lib/sampling_prof.rb
CHANGED
@@ -11,11 +11,10 @@ class SamplingProf
|
|
11
11
|
|
12
12
|
# options:
|
13
13
|
# sampling_interval: default to 0.1 second
|
14
|
-
#
|
14
|
+
# max: max sampling threads, default to 8 threads
|
15
15
|
# &output_handler: default to write into output_file
|
16
16
|
def initialize(*args, &output_handler)
|
17
17
|
self.sampling_interval = args[0] || 0.1
|
18
|
-
self.profiling_threshold = args[1] || 0
|
19
18
|
self.output_handler = block_given? ? output_handler : default_output_handler
|
20
19
|
internal_initialize if respond_to?(:internal_initialize)
|
21
20
|
end
|
@@ -60,7 +60,7 @@ class SamplingProf
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
attr_accessor :sampling_interval, :output_handler
|
63
|
+
attr_accessor :sampling_interval, :output_handler
|
64
64
|
|
65
65
|
def internal_initialize
|
66
66
|
@samplings = {}
|
@@ -105,9 +105,7 @@ class SamplingProf
|
|
105
105
|
@sampling_thread ||= Thread.start do
|
106
106
|
loop do
|
107
107
|
@samplings.dup.each do |t, s|
|
108
|
-
|
109
|
-
s.process(t)
|
110
|
-
end
|
108
|
+
s.process(t)
|
111
109
|
end
|
112
110
|
sleep @sampling_interval
|
113
111
|
break unless @running
|
metadata
CHANGED
@@ -1,69 +1,70 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: sampling_prof
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
7
|
-
- Xiao Li
|
8
|
-
autorequire:
|
6
|
+
authors:
|
7
|
+
- Xiao Li
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
version: '0.9'
|
28
|
-
- - '>='
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: 0.9.2
|
31
|
-
prerelease: false
|
32
|
-
type: :development
|
11
|
+
|
12
|
+
date: 2014-06-18 00:00:00 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rake-compiler
|
16
|
+
prerelease: false
|
17
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: "0.9"
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 0.9.2
|
25
|
+
type: :development
|
26
|
+
version_requirements: *id001
|
33
27
|
description: |
|
34
28
|
SamplingProf is a profiling tool that operates by sampling your running thread stacktrace. The result is statistical approximation, but it allows your code to run near full speed
|
35
|
-
|
36
|
-
|
29
|
+
|
30
|
+
email:
|
31
|
+
- swing1979@gmail.com
|
37
32
|
executables: []
|
33
|
+
|
38
34
|
extensions: []
|
35
|
+
|
39
36
|
extra_rdoc_files: []
|
40
|
-
|
41
|
-
|
42
|
-
-
|
43
|
-
- lib/sampling_prof.
|
44
|
-
- lib/sampling_prof
|
37
|
+
|
38
|
+
files:
|
39
|
+
- README.md
|
40
|
+
- lib/sampling_prof.jar
|
41
|
+
- lib/sampling_prof.rb
|
42
|
+
- lib/sampling_prof/internal.rb
|
45
43
|
homepage: https://github.com/xli/sampling_prof
|
46
|
-
licenses:
|
47
|
-
- MIT
|
44
|
+
licenses:
|
45
|
+
- MIT
|
48
46
|
metadata: {}
|
49
|
-
|
47
|
+
|
48
|
+
post_install_message:
|
50
49
|
rdoc_options: []
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
50
|
+
|
51
|
+
require_paths:
|
52
|
+
- lib
|
53
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- &id002
|
56
|
+
- ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: "0"
|
59
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- *id002
|
63
62
|
requirements: []
|
64
|
-
|
63
|
+
|
64
|
+
rubyforge_project:
|
65
65
|
rubygems_version: 2.1.9
|
66
|
-
signing_key:
|
66
|
+
signing_key:
|
67
67
|
specification_version: 4
|
68
68
|
summary: Simple sampling profiler for ruby
|
69
69
|
test_files: []
|
70
|
+
|