File: disable-timing-tests.patch

package info (click to toggle)
ruby-hitimes 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 372 kB
  • sloc: ruby: 1,385; makefile: 7
file content (201 lines) | stat: -rw-r--r-- 4,921 bytes parent folder | download
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
196
197
198
199
200
201
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(+)

--- a/spec/hitimes_spec.rb
+++ b/spec/hitimes_spec.rb
@@ -4,6 +4,7 @@ require "spec_helper"
 
 describe Hitimes do
   it "can time a block of code" do
+    skip
     d = Hitimes.measure { sleep 0.01 }
     _(d).must_be :>, 0
   end
--- a/spec/interval_spec.rb
+++ b/spec/interval_spec.rb
@@ -41,6 +41,7 @@ describe Hitimes::Interval do
   end
 
   it "can time a block of code" do
+    skip
     d = Hitimes::Interval.measure do
       sleep 0.01
     end
--- a/spec/timed_metric_spec.rb
+++ b/spec/timed_metric_spec.rb
@@ -44,6 +44,7 @@ describe Hitimes::TimedMetric do
   end
 
   it "calculates the mean of the durations" do
+    skip
     2.times do
       @tm.start
       @tm.stop
@@ -52,6 +53,7 @@ describe Hitimes::TimedMetric do
   end
 
   it "calculates the rate of the counts " do
+    skip
     5.times do
       @tm.start
       @tm.stop
@@ -60,6 +62,7 @@ describe Hitimes::TimedMetric do
   end
 
   it "calculates the stddev of the durations" do
+    skip
     3.times do |_x|
       @tm.start
       @tm.stop
@@ -72,6 +75,7 @@ describe Hitimes::TimedMetric do
   end
 
   it "keeps track of the min value" do
+    skip
     2.times do
       @tm.start
       @tm.stop
@@ -80,6 +84,7 @@ describe Hitimes::TimedMetric do
   end
 
   it "keeps track of the max value" do
+    skip
     2.times do
       @tm.start
       @tm.stop
@@ -88,6 +93,7 @@ describe Hitimes::TimedMetric do
   end
 
   it "keeps track of the sum value" do
+    skip
     2.times do
       @tm.start
       @tm.stop
@@ -96,6 +102,7 @@ describe Hitimes::TimedMetric do
   end
 
   it "keeps track of the sum of squars value" do
+    skip
     3.times do
       @tm.start
       @tm.stop
@@ -134,6 +141,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.01 } }
     _(t.duration).must_be :>, 0
@@ -141,6 +149,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 do
       sleep 0.01
@@ -163,6 +172,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 :>, 0
--- a/spec/timed_value_metric_spec.rb
+++ b/spec/timed_value_metric_spec.rb
@@ -47,6 +47,7 @@ describe Hitimes::TimedValueMetric do
   end
 
   it "calculates the mean of the durations" do
+    skip
     3.times do |x|
       @tm.start
       @tm.stop(x)
@@ -56,6 +57,7 @@ describe Hitimes::TimedValueMetric do
   end
 
   it "calculates the rate of the counts " do
+    skip
     5.times do |x|
       @tm.start
       @tm.stop(x)
@@ -64,6 +66,7 @@ describe Hitimes::TimedValueMetric do
   end
 
   it "calculates the stddev of the durations" do
+    skip
     3.times do |x|
       @tm.start
       @tm.stop(x)
@@ -78,6 +81,7 @@ describe Hitimes::TimedValueMetric do
   end
 
   it "keeps track of the min value" do
+    skip
     3.times do |x|
       @tm.start
       @tm.stop(x)
@@ -87,6 +91,7 @@ describe Hitimes::TimedValueMetric do
   end
 
   it "keeps track of the max value" do
+    skip
     3.times do |x|
       @tm.start
       @tm.stop(x)
@@ -96,6 +101,7 @@ describe Hitimes::TimedValueMetric do
   end
 
   it "keeps track of the sum value" do
+    skip
     3.times do |x|
       @tm.start
       @tm.stop(x)
@@ -105,6 +111,7 @@ describe Hitimes::TimedValueMetric do
   end
 
   it "keeps track of the sum of squares value" do
+    skip
     3.times do |x|
       @tm.start
       @tm.stop(x)
@@ -141,6 +148,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.001 } }
     _(t.duration).must_be :>, 0
@@ -149,6 +157,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) do
       sleep 0.001
@@ -171,6 +180,7 @@ describe Hitimes::TimedValueMetric do
     end
 
     it "has a rate" do
+      skip
       5.times do |x|
         @tm.start
         @tm.stop(x)