[前][次][番号順一覧][スレッド一覧]

ruby-changes:46819

From: normal <ko1@a...>
Date: Sun, 28 May 2017 10:43:44 +0900 (JST)
Subject: [ruby-changes:46819] normal:r58934 (trunk): tests: increase CPU percentage threshold for assert_cpu_usage_low

normal	2017-05-28 10:43:38 +0900 (Sun, 28 May 2017)

  New Revision: 58934

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58934

  Log:
    tests: increase CPU percentage threshold for assert_cpu_usage_low
    
    When sleeping for the tick rate of 100ms (defined in
    thread_pthread.c) as we do in test/ruby/test_io.rb
    (test_copy_stream_no_busy_wait), it may not be possible to
    measure with <= 10ms resolution on 100HZ systems (CONFIG_HZ in
    the Linux kernel).  So increase the threshold to 15ms (10ms +
    5ms slack for slow systems).
    
    * test/lib/test/unit/assertions.rb (assert_cpu_usage_low):
      increase pct default value [ruby-core:81427]

  Modified files:
    trunk/test/lib/test/unit/assertions.rb
Index: test/lib/test/unit/assertions.rb
===================================================================
--- test/lib/test/unit/assertions.rb	(revision 58933)
+++ test/lib/test/unit/assertions.rb	(revision 58934)
@@ -715,7 +715,7 @@ eom https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/assertions.rb#L715
         skip
       end
 
-      def assert_cpu_usage_low(msg = nil, pct: 0.005)
+      def assert_cpu_usage_low(msg = nil, pct: 0.015)
         require 'benchmark'
         tms = Benchmark.measure(msg || '') { yield }
         max = pct * tms.real

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]