sampling_prof 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
- ---
2
- SHA1:
3
- metadata.gz: a2f2357ea9311b4ef8157446b42e585a695fb375
4
- data.tar.gz: cf0894a1573dc197d583e151625f5052aaccfc26
5
- SHA512:
6
- metadata.gz: 4778218e89b20e08aa26ce65468c9d187a79077833f82c770f81d3a6eaeac072debbcbf1bca38b2ed847ba448272b843e26c03005e3d929f7b70055f07a11a07
7
- data.tar.gz: f5e0588bc802ba2ebb43c5c4892962e5e434fa299853172e883fcdc85cbc8617c8f66fc289f06bac9695118707bcb7cdb9a333f79826739046dce02ac57f8320
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0794324a024699df824bed72d7ce8b80d886ea80
4
+ data.tar.gz: f0255164047aaf6d2a9161d0c3a7526d104cac93
5
+ SHA512:
6
+ metadata.gz: d52a265a89052c49eea16e4dbd74d3e2efe7f66edafe8be016e0f4aa0ec1dba8e2604db45af20bdc91ceb508d05cea3a607df58560e0c8e5016f65179b1c49b2
7
+ data.tar.gz: edc8d90595a712a04726364829e752bfa400b78be5cffeaee621c09d9718bc888fc969024c60eb150a897d86cd3fcacce07125c548f7e303ed75432a42a00448
Binary file
@@ -11,11 +11,10 @@ class SamplingProf
11
11
 
12
12
  # options:
13
13
  # sampling_interval: default to 0.1 second
14
- # profiling_threshold: default to 0 second
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, :profiling_threshold
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
- if s.runtime >= @profiling_threshold
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
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
- date: 2014-06-14 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rake-compiler
15
- version_requirements: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: '0.9'
20
- - - '>='
21
- - !ruby/object:Gem::Version
22
- version: 0.9.2
23
- requirement: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ~>
26
- - !ruby/object:Gem::Version
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
- email:
36
- - swing1979@gmail.com
29
+
30
+ email:
31
+ - swing1979@gmail.com
37
32
  executables: []
33
+
38
34
  extensions: []
35
+
39
36
  extra_rdoc_files: []
40
- files:
41
- - README.md
42
- - lib/sampling_prof.jar
43
- - lib/sampling_prof.rb
44
- - lib/sampling_prof/internal.rb
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
- post_install_message:
47
+
48
+ post_install_message:
50
49
  rdoc_options: []
51
- require_paths:
52
- - lib
53
- required_ruby_version: !ruby/object:Gem::Requirement
54
- requirements:
55
- - - '>='
56
- - !ruby/object:Gem::Version
57
- version: '0'
58
- required_rubygems_version: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - '>='
61
- - !ruby/object:Gem::Version
62
- version: '0'
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
- rubyforge_project:
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
+