This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'bundler/setup' | |
require 'celluloid/autostart' | |
require 'benchmark' | |
message = :ohai |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "timeout" | |
desc "Run Celluloid benchmarks" | |
task :benchmark do | |
begin | |
Timeout.timeout(120) do | |
if ENV['FILE'] | |
glob = File.expand_path("../../benchmarks/#{ENV['FILE']}.rb", __FILE__) | |
else | |
glob = File.expand_path("../../benchmarks/*.rb", __FILE__) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "rubygems" | |
require "bundler/setup" | |
require "celluloid/autostart" | |
require "benchmark/ips" | |
class BenchmarkingActor | |
include Celluloid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ benchmark git:(master) ✗ rake benchmark | |
(in /Users/aayushranaut/Developer/celluloid) | |
Resolving dependencies... | |
I, [2016-06-09T18:31:47.435902 #17301] INFO -- : Celluloid 0.17.4 is running in BACKPORTED mode. [ http://git.io/vJf3J ] | |
ERROR: Couldn't complete benchmark: Celluloid::Error: Celluloid is not yet started; use Celluloid.boot | |
/Users/aayushranaut/Developer/celluloid/lib/celluloid.rb:38:in `actor_system' | |
/Users/aayushranaut/Developer/celluloid/lib/celluloid.rb:208:in `actor_system' | |
/Users/aayushranaut/Developer/celluloid/lib/celluloid.rb:214:in `actor_options' | |
/Users/aayushranaut/Developer/celluloid/lib/celluloid.rb:185:in `new' | |
/Users/aayushranaut/Developer/celluloid/benchmarks/actor.rb:26:in `<top (required)>' |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Measure Mode: wall_time | |
Thread ID: 70195624296960 | |
Fiber ID: 70195621886140 | |
Total Time: 9.687909841537476 | |
Sort by: total_time | |
%total %self total self wait child calls name | |
-------------------------------------------------------------------------------- | |
100.00% 0.00% 9.688 0.000 0.000 9.688 1 Global#[No method] | |
9.641 0.000 9.641 0.000 1/1 <Class::IO>#select |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Measure Mode: wall_time | |
Thread ID: 70197101060600 | |
Fiber ID: 70197103015220 | |
Total Time: 51.83754205703735 | |
Sort by: total_time | |
%total %self total self wait child calls name | |
-------------------------------------------------------------------------------- | |
100.00% 0.00% 51.838 0.000 0.000 51.837 1 Global#[No method] | |
51.691 0.000 51.691 0.000 1/1 <Class::IO>#select |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
$LOAD_PATH.push File.expand_path("../../lib", __FILE__) | |
require "celluloid/autostart" | |
require "digest/sha2" | |
class Hasher | |
include Celluloid | |
def initialize(secret) |
NewerOlder