Here's a preliminary experiment to see how much memory is saved with the new copy-on-write friendly (bitmap marking) GC.
Calculated by memstats.rb https://gist.github.com/kenn/5105061 on Debian x86_64.
# ./memstats.rb 20547
require 'rubygems' | |
require 'rack/streaming_proxy' | |
use Rack::Auth::Basic, "Restricted Area" do |username, password| | |
[username, password] == ['user', 'password'] | |
end | |
use Rack::StreamingProxy do |request| | |
if request.path.start_with?("/proxy") | |
"http://other.host#{request.path}" |
このLEMONってのがrapgeniusの人ね。 | |
http://cache.gyazo.com/91f2e906a220fbeef2e9283b0aee597a.png | |
Unicorn使っても2workerで動いているところに遅いリクエストが3件来たら詰まるよ!! | |
根本的な解決にならない!! | |
とか言ってるんですよ。 | |
じゃあ例えば、並列数1x10と並列数2x5で遅いリクエスト5件投げてキューに詰まる確率を考えてみよう。 | |
絵で表すとこう。絵じゃなくて文字だけど。 |
Here's a preliminary experiment to see how much memory is saved with the new copy-on-write friendly (bitmap marking) GC.
Calculated by memstats.rb https://gist.github.com/kenn/5105061 on Debian x86_64.
# ./memstats.rb 20547
メモ | |
全体的なこと | |
- 想定してるRubyとかRailsのバージョンが古いので何とかしたい。 | |
- 個人的に改造してる人がそれなりにいるので、その辺まとめたい。 | |
- github/livedoor もあるんだけど、そこにadmin権限持ってるユーザー好き勝手追加は怖いので別で + コミュニティ主導でやりたい | |
- html/js/css も割と古くなってしまっているので、そのへんも何とかしたい。 | |
---- | |
オープンソースに拘るのは保険的な意味合いもあるのだけど、 | |
サービス型のRSSリーダーで出来無いことがそれなりにあるというのが大きい。 |
= 桐島、((*Ruby*))やめるってよ | |
: author | |
nari/@nari3/authorNari | |
: institution | |
ネットワーク応用通信研究所 | |
: content-source | |
#odrk03 | |
: date | |
2013/3/16 |
# !!!!! まだ動きません!!!!! Fastladder 側で改修が必要 !!!!! | |
require 'user-stream-receiver' | |
require 'json' | |
require 'rest_client' | |
UserStreamReceiver.new.run{|chunk| | |
begin | |
chunk = JSON.parse(chunk) |
require 'listen' | |
def run(files_to_run) | |
puts "Running: #{files_to_run}" | |
system %|bundle exec spring rspec #{files_to_run}| | |
end | |
Listen.to 'spec', filter: /.*_spec\.rb/ do |modified, added, removed| | |
file_to_run = (modified || added).first | |
run file_to_run |
{ | |
id addressbook = [OCMockObject mockForClass:[RHAddressBook class]]; | |
id person = [OCMockObject mockForClass:[RHPerson class]]; | |
[[person expect] setFirstName:@"テスト"];// 実行順序 3 | |
[[person expect] setLastName:@"ユーザー"];// 実行順序 4 | |
[[person expect] save];// 実行順序 6 | |
RHMutableMultiValue* emails = [[RHMutableMultiValue alloc] initWithType:kABMultiStringPropertyType]; | |
[emails addValue:@"test@example.com" withLabel:(__bridge NSString*)kABWorkLabel]; |
module Element | |
alias_method :near_equal?, :=== | |
def ===(other) | |
other.respond_to?(:include?) ? other.include?(self) : self.near_equal?(other) | |
end | |
end | |
[String, Symbol, Numeric].each do |elm| | |
elm.send(:include, Element) |