summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-30 06:22:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-30 06:22:30 +0000
commit4b298ad77a8388f0aae62daeca66659a8effeade (patch)
tree163674f4123bf461a86b4f6fd1de964297057bae /benchmark
parent0df79477bd2cd534ad2d89bfdbf9708c64b59eed (diff)
Use qualified names
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/bm_vm2_mutex.rb2
-rw-r--r--benchmark/bm_vm_thread_mutex1.rb2
-rw-r--r--benchmark/bm_vm_thread_mutex2.rb2
-rw-r--r--benchmark/bm_vm_thread_mutex3.rb2
-rw-r--r--benchmark/bm_vm_thread_queue.rb2
5 files changed, 5 insertions, 5 deletions
diff --git a/benchmark/bm_vm2_mutex.rb b/benchmark/bm_vm2_mutex.rb
index 7362f738c5..5d16480c6b 100644
--- a/benchmark/bm_vm2_mutex.rb
+++ b/benchmark/bm_vm2_mutex.rb
@@ -1,6 +1,6 @@
require 'thread'
-m = Mutex.new
+m = Thread::Mutex.new
i = 0
while i<6_000_000 # benchmark loop 2
diff --git a/benchmark/bm_vm_thread_mutex1.rb b/benchmark/bm_vm_thread_mutex1.rb
index 5c9f85dfb7..66e42c85e1 100644
--- a/benchmark/bm_vm_thread_mutex1.rb
+++ b/benchmark/bm_vm_thread_mutex1.rb
@@ -1,7 +1,7 @@
# one thread, one mutex (no contention)
require 'thread'
-m = Mutex.new
+m = Thread::Mutex.new
r = 0
max = 2000
lmax = max * max
diff --git a/benchmark/bm_vm_thread_mutex2.rb b/benchmark/bm_vm_thread_mutex2.rb
index 10de59054f..6e6c804c31 100644
--- a/benchmark/bm_vm_thread_mutex2.rb
+++ b/benchmark/bm_vm_thread_mutex2.rb
@@ -1,7 +1,7 @@
# two threads, one mutex
require 'thread'
-m = Mutex.new
+m = Thread::Mutex.new
r = 0
max = 2000
lmax = (max * max)/2
diff --git a/benchmark/bm_vm_thread_mutex3.rb b/benchmark/bm_vm_thread_mutex3.rb
index 7f9a44b39d..c750dc542a 100644
--- a/benchmark/bm_vm_thread_mutex3.rb
+++ b/benchmark/bm_vm_thread_mutex3.rb
@@ -1,7 +1,7 @@
# 1000 threads, one mutex
require 'thread'
-m = Mutex.new
+m = Thread::Mutex.new
r = 0
max = 2000
(1..max).map{
diff --git a/benchmark/bm_vm_thread_queue.rb b/benchmark/bm_vm_thread_queue.rb
index 37381ae62b..274ceda366 100644
--- a/benchmark/bm_vm_thread_queue.rb
+++ b/benchmark/bm_vm_thread_queue.rb
@@ -1,7 +1,7 @@
require 'thread'
n = 1_000_000
-q = Queue.new
+q = Thread::Queue.new
consumer = Thread.new{
while q.pop
# consuming