logstash/bin/logstashd.rb
Jordan Sissel 434a633013 - hashbind is back! Dynamically generate methods that we would normally
hand-code. This method is as fast as the hand-coded method and with less
  writing.
- Make message registration easier with a simple 'register' function:
  class Foo < Message
    register
  end

  We dynamically generate the message 'type' by the class name.
2009-09-10 09:59:24 +00:00

26 lines
534 B
Ruby

#!/usr/bin/env ruby
require 'rubygems'
require 'lib/net/servers/indexer'
if ENV.has_key?("PROFILE")
require 'ruby-prof'
RubyProf.start
#class String
#alias_method :orig_scan, :scan
#def scan(*args)
##raise
#return orig_scan(*args)
#end
#end
end
Thread::abort_on_exception = true
s = LogStash::Net::Servers::Indexer.new(username='', password='', host="localhost")
s.run
if ENV.has_key?("PROFILE")
result = RubyProf.stop
printer = RubyProf::FlatPrinter.new(result)
printer.print(STDOUT, 0)
end