diff options
author | Ian Ownbey <ian@inspir.es> | 2009-01-31 14:39:05 -0800 |
---|---|---|
committer | Ian Ownbey <ian@inspir.es> | 2009-01-31 14:39:05 -0800 |
commit | a6ee022e745c68d5d61e7ef89850d6b595f49f7e (patch) | |
tree | e865e34d9de7e3315dfd4b98876d6d393bd2d69d | |
parent | 46293ab57e1a17dda21d3578b6d678f9ae31096f (diff) | |
download | unicorn-a6ee022e745c68d5d61e7ef89850d6b595f49f7e.tar.gz |
-rw-r--r-- | test/unit/test_stats.rb | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/test/unit/test_stats.rb b/test/unit/test_stats.rb deleted file mode 100644 index 012c6a5..0000000 --- a/test/unit/test_stats.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2005 Zed A. Shaw -# You can redistribute it and/or modify it under the same terms as Ruby. -# -# Additional work donated by contributors. See http://mongrel.rubyforge.org/attributions.html -# for more information. - -require 'test/test_helper' - -class StatsTest < Test::Unit::TestCase - - def test_sampling_speed - out = StringIO.new - - s = Mongrel::Stats.new("test") - t = Mongrel::Stats.new("time") - - 100.times { s.sample(rand(20)); t.tick } - - s.dump("FIRST", out) - t.dump("FIRST", out) - - old_mean = s.mean - old_sd = s.sd - - s.reset - t.reset - 100.times { s.sample(rand(30)); t.tick } - - s.dump("SECOND", out) - t.dump("SECOND", out) - assert_not_equal old_mean, s.mean - assert_not_equal old_mean, s.sd - end - -end |