This file contains 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 "csv" | |
require "time" | |
require "file" | |
res = Hash(String, Array(Int64 | Int32)).new {|hsh, key| hsh[key] = [] of Int32 | Int64 } | |
stack = [] of Hash(String, Array(String | Int64 | Int32)) | |
CSV.each_row(File.open("trace.csv")) do |line| | |
begin | |
type, file, no, time = line | |
if type == "call" |
This file contains 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 'ruby-prof' | |
RubyProf.measure_mode = RubyProf::WALL_TIME | |
RubyProf.start | |
# DO SOME WORK | |
results = RubyProf.stop | |
profile_location = 'tmp/zomg_profile.html' | |
File.open profile_location, 'w' do |file| | |
RubyProf::GraphHtmlPrinter.new(results).print(file) | |
end |
This file contains 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
#!/bin/sh | |
old_ref=$1 | |
new_ref=$2 | |
changing_branch=$3 | |
if [[ $changing_branch == 1 && $old_ref != $new_ref ]] | |
then | |
/bin/echo -n 'Generating tags file...' | |
ctags -R 2> /dev/null |
This file contains 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 'rubygems' | |
require 'hpricot' | |
require 'net/http' | |
require 'uri' | |
require 'cgi' | |
require 'csv' | |
def do_request(path) | |
url = URI.parse(path) | |
req = Net::HTTP::Get.new("#{url.path}?#{url.query}") |