File: disable-timing-tests.patch

package info (click to toggle)
ruby-hitimes 1.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 388 kB
  • sloc: ruby: 1,196; ansic: 418; java: 265; makefile: 15
file content (195 lines) | stat: -rw-r--r-- 5,939 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
From: Tim Potter <tpot@hpe.com>
Date: Mon, 24 Aug 2015 14:20:34 +1000
Subject: Disable timing tests susceptible to sceduling latency

Disable the tests that fail based on how timing latency may
be introduced into the test process by a loaded or insufficiently
powerful test machine.

Forwarded: not-needed
Bug-Debian: https://bugs.debian.org/998099
---
 spec/hitimes_spec.rb            |  1 +
 spec/interval_spec.rb           |  1 +
 spec/timed_metric_spec.rb       | 10 ++++++++++
 spec/timed_value_metric_spec.rb | 10 ++++++++++
 4 files changed, 22 insertions(+)

diff --git a/spec/hitimes_spec.rb b/spec/hitimes_spec.rb
index 73e1c16..6c8052a 100644
--- a/spec/hitimes_spec.rb
+++ b/spec/hitimes_spec.rb
@@ -2,6 +2,7 @@ require 'spec_helper'
 
 describe Hitimes do
   it "can time a block of code" do
+    skip
     d = Hitimes.measure do
       sleep 0.2
     end
diff --git a/spec/interval_spec.rb b/spec/interval_spec.rb
index 980f8ca..e0e9869 100644
--- a/spec/interval_spec.rb
+++ b/spec/interval_spec.rb
@@ -37,6 +37,7 @@ describe Hitimes::Interval do
   end
 
   it "can time a block of code" do
+    skip
     d = Hitimes::Interval.measure do
       sleep 0.2
     end
diff --git a/spec/timed_metric_spec.rb b/spec/timed_metric_spec.rb
index 487f2f2..1e8fc17 100644
--- a/spec/timed_metric_spec.rb
+++ b/spec/timed_metric_spec.rb
@@ -42,17 +42,20 @@ describe Hitimes::TimedMetric do
   end
 
   it "calculates the mean of the durations" do
+    skip
     2.times { @tm.start ; sleep 0.05 ; @tm.stop }
     @tm.mean.must_be_close_to(0.05, 0.002)
   end
 
   it "calculates the rate of the counts " do
+    skip
     5.times { @tm.start ; sleep 0.05 ; @tm.stop }
     @tm.rate.must_be_close_to(20.00, 0.5)
   end
 
 
   it "calculates the stddev of the durations" do
+    skip
     3.times { |x| @tm.start ; sleep(0.05 * x) ; @tm.stop }
     @tm.stddev.must_be_close_to(0.05)
   end
@@ -62,21 +65,25 @@ describe Hitimes::TimedMetric do
   end
 
   it "keeps track of the min value" do
+    skip
     2.times { @tm.start ; sleep 0.05 ; @tm.stop }
     @tm.min.must_be_close_to(0.05, 0.01)
   end
 
   it "keeps track of the max value" do
+    skip
     2.times { @tm.start ; sleep 0.05 ; @tm.stop }
     @tm.max.must_be_close_to(0.05, 0.01)
   end
 
   it "keeps track of the sum value" do
+    skip
     2.times { @tm.start ; sleep 0.05 ; @tm.stop }
     @tm.sum.must_be_close_to(0.10, 0.01)
   end
 
   it "keeps track of the sum of squars value" do
+    skip
     3.times { @tm.start ; sleep 0.05 ; @tm.stop }
     @tm.sumsq.must_be_close_to(0.0075)
   end
@@ -111,6 +118,7 @@ describe Hitimes::TimedMetric do
   end
 
   it "can measure a block of code from an instance" do
+    skip
     t = Hitimes::TimedMetric.new( 'measure a block' )
     3.times { t.measure { sleep 0.05 } }
     t.duration.must_be_close_to(0.15, 0.01)
@@ -118,6 +126,7 @@ describe Hitimes::TimedMetric do
   end
 
   it "returns the value of the block when measuring" do
+    skip
     t = Hitimes::TimedMetric.new( 'measure a block' )
     x = t.measure { sleep 0.05; 42 }
     t.duration.must_be_close_to(0.05, 0.002)
@@ -138,6 +147,7 @@ describe Hitimes::TimedMetric do
     end
 
     it "has the right sum" do
+      skip
       10.times { |x| @tm.measure { sleep 0.01*x  } }
       h = @tm.to_hash
       h['sum'].must_be_close_to(0.45, 0.01)
diff --git a/spec/timed_value_metric_spec.rb b/spec/timed_value_metric_spec.rb
index ddb1d09..7027dc8 100644
--- a/spec/timed_value_metric_spec.rb
+++ b/spec/timed_value_metric_spec.rb
@@ -45,18 +45,21 @@ describe Hitimes::TimedValueMetric do
   end
 
   it "calculates the mean of the durations" do
+    skip
     3.times { |x| @tm.start ; sleep 0.05 ; @tm.stop(x) }
     @tm.timed_stats.mean.must_be_close_to(0.05, 0.01)
     @tm.value_stats.mean.must_equal 1.00
   end
 
   it "calculates the rate of the counts " do
+    skip
     5.times { |x| @tm.start ; sleep 0.05 ; @tm.stop( x ) }
     @tm.rate.must_be_close_to(40.0, 1.0)
   end
 
 
   it "calculates the stddev of the durations" do
+    skip
     3.times { |x| @tm.start ; sleep(0.05 * x) ; @tm.stop(x) }
     @tm.timed_stats.stddev.must_be_close_to(0.05, 0.001)
     @tm.value_stats.stddev.must_equal 1.0
@@ -68,24 +71,28 @@ describe Hitimes::TimedValueMetric do
   end
 
   it "keeps track of the min value" do
+    skip
     3.times { |x| @tm.start ; sleep 0.05 ; @tm.stop( x ) }
     @tm.timed_stats.min.must_be_close_to( 0.05, 0.003 )
     @tm.value_stats.min.must_equal 0
   end
 
   it "keeps track of the max value" do
+    skip
     3.times { |x| @tm.start ; sleep 0.05 ; @tm.stop( x ) }
     @tm.timed_stats.max.must_be_close_to( 0.05, 0.003 )
     @tm.value_stats.max.must_equal 2
   end
 
   it "keeps track of the sum value" do
+    skip
     3.times { |x| @tm.start ; sleep 0.05 ; @tm.stop( x ) }
     @tm.timed_stats.sum.must_be_close_to( 0.15, 0.01 )
     @tm.value_stats.sum.must_equal 3
   end
   
   it "keeps track of the sum of squares value" do
+    skip
     3.times { |x| @tm.start ; sleep 0.05 ; @tm.stop( x ) }
     @tm.timed_stats.sumsq.must_be_close_to(0.0075, 0.0005)
     @tm.value_stats.sumsq.must_equal 5
@@ -120,6 +127,7 @@ describe Hitimes::TimedValueMetric do
   end
 
   it "can measure a block of code from an instance" do
+    skip
     t = Hitimes::TimedValueMetric.new( 'measure a block' )
     3.times { t.measure( 1 ) { sleep 0.05 } }
     t.duration.must_be_close_to(0.15, 0.004)
@@ -128,6 +136,7 @@ describe Hitimes::TimedValueMetric do
   end
 
   it "returns the value of the block when measuring" do
+    skip
     t = Hitimes::TimedValueMetric.new( 'measure a block' )
     x = t.measure( 42 ) { sleep 0.05; 42 }
     t.duration.must_be_close_to(0.05, 0.002)
@@ -148,6 +157,7 @@ describe Hitimes::TimedValueMetric do
     end
 
     it "has a rate" do
+      skip
       5.times { |x| @tm.start ; sleep 0.05 ; @tm.stop( x ) }
       h = @tm.to_hash
       h['rate'].must_be_close_to(40.0, 1.0)