Sha256: 1ec764c1d8dfda74ef6411618447d7a55c2c5b55eba8889db2ce332aa3289f4e
Contents?: true
Size: 819 Bytes
Versions: 3
Compression:
Stored size: 819 Bytes
Contents
#!/usr/bin/env ruby require 'optparse' require 'rack' require_relative '../lib/stackprof-webnav' options = { :addr => "127.0.0.1", :port => 9292 } parser = OptionParser.new(ARGV) do |o| o.banner = "Usage: stackprof-webnav [-f localfile.dump]|[-d directory]|[-o ADDR]|[-p NUMBER]" o.on('-f [LOCALFILE]', 'Local file path to dump') {|filepath| options[:filepath] = filepath } o.on('-d [DIRECTORY]', 'path to a directory with dumps') {|directory| options[:directory] = directory} o.on('-o [ADDR]', 'Server addr bind') {|addr| options[:addr] = addr } o.on('-p [PORT]', 'Server port') {|port| options[:port] = port } end parser.parse! server = StackProf::Webnav::Server server.cmd_options = options Rack::Handler.pick(['thin', 'webrick']).run server.new, :Host => options[:addr], :Port => options[:port]
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
stackprof-webnav-1.0.4 | bin/stackprof-webnav |
stackprof-webnav-1.0.3 | bin/stackprof-webnav |
stackprof-webnav-1.0.2 | bin/stackprof-webnav |