sampling_prof 0.3.1 → 0.3.2

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
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79d31489bf4da8c98f0c5e868eaad15001f552dc
4
- data.tar.gz: 74e4a7286f56f2ddebd85c527e834dff51e87e9f
3
+ metadata.gz: 67a32fb9840e432741396d9678bfdff29325ae6d
4
+ data.tar.gz: f09d48a2ab060f0a21e3a72e65818ecde00f1e61
5
5
  SHA512:
6
- metadata.gz: 2583fd7fb1f8717427015e6df4e87fe30d3ae56a6628b9973bf9a9b9269a1bb9b1cd4a6c6ac8fc89c7d6dab2742377cb37ea45b0e7a2be7de8d98097fd9e7c0d
7
- data.tar.gz: 1a480525f226a2a4c780ed44d9c172e1564356fe11bdd0ddd4c01080126fa84480c7ec709b130c39d3fd2f0939856aa1067eb0a83a4f0a0862646804ae756a66
6
+ metadata.gz: 6a78021baf2b12e5ad9d88ac050814a02a15ba3987ee1b3f5988547f8e4b90ad04ff4cf8a74ce612c8c49ac3044b2c599296a713335ea47b159354f6468b104d
7
+ data.tar.gz: 0efb16d632fca6470ea2dfc338857d47f3f69938aa68b40cf34db2fe2db9a1a7efe01130ea67d1ccd021cc681befc31c913f30488b55ca8cbc3a13c52b5da7c6
Binary file
@@ -15,6 +15,10 @@ class SamplingProf
15
15
  Time.now - @start_at
16
16
  end
17
17
 
18
+ def sampling_data?
19
+ !@nodes.empty?
20
+ end
21
+
18
22
  def result
19
23
  ret = [@threads.sampling_runtime * 1000]
20
24
  ret << @nodes.map {|node| node.join(',')}.join("\n")
@@ -121,7 +125,9 @@ class SamplingProf
121
125
  sampling.process
122
126
  sleep @sampling_interval
123
127
  end
124
- @output_handler.call(sampling.result)
128
+ if sampling.sampling_data?
129
+ @output_handler.call(sampling.result)
130
+ end
125
131
  break unless @running
126
132
  end
127
133
  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.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xiao Li