diff options
author | Cary Clark <> | 2009-03-24 21:14:25 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-24 21:14:25 -0700 |
commit | 5ec837f49e9c57d4394ce64b853fd86269c8b340 (patch) | |
tree | de89879b3a2cb0d713abc3c1fac766cb17706245 /WebKitTools/iExploder/tools/lasthit.rb | |
parent | 02ba42cb469e2f0e26216fe434dbb912cf48d248 (diff) | |
download | external_webkit-5ec837f49e9c57d4394ce64b853fd86269c8b340.zip external_webkit-5ec837f49e9c57d4394ce64b853fd86269c8b340.tar.gz external_webkit-5ec837f49e9c57d4394ce64b853fd86269c8b340.tar.bz2 |
Automated import from //branches/master/...@141953,141953
Diffstat (limited to 'WebKitTools/iExploder/tools/lasthit.rb')
-rwxr-xr-x | WebKitTools/iExploder/tools/lasthit.rb | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/WebKitTools/iExploder/tools/lasthit.rb b/WebKitTools/iExploder/tools/lasthit.rb deleted file mode 100755 index b569deb..0000000 --- a/WebKitTools/iExploder/tools/lasthit.rb +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/ruby -# lasthit, part of iExploder -# -# Shows statistics about recent agents that have tested with iExploder. -# It takes all or part of an apache logfile via stdin, and outputs a list -# of all the agents who tested within that section, what their last test -# was, and how many tests they have done. - -# The usefulness is finding out where a browser crashed. - - -hostHash = Hash.new - -if (ARGV[0]) - file = File.open(ARGV[0]) -else - file = $stdin -end - -file.readlines.each { |line| - if (line =~ /^(.*?) .*iexploder.*?test=(\d+).* HTTP.* \"(.*?)\"$/) - host = $1 - testnum = $2 - agent = $3 - if (! hostHash[host]) - hostHash[host] = Hash.new - end - if (! hostHash[host][agent]) - hostHash[host][agent] = Hash.new - hostHash[host][agent]['total'] = 0 - end - - hostHash[host][agent]['last'] = testnum - if line =~ /subtest=(\d+)/ - hostHash[host][agent]['subtest'] = $1 - else - hostHash[host][agent]['subtest'] = '' - end - hostHash[host][agent]['total'] = hostHash[host][agent]['total'] + 1 - end -} - -printf("%14.14s | %8.8s | %3.3s | %8.8s | %s\n", - "IP", "Test", "SubTest", "Total", "Agent") -puts "---------------------------------------------------------------------------" -hostHash.each_key { |host| - - hostHash[host].each_key { |agent| - printf("%14.14s | %8.8s | %3.3s | %8.8s | %s\n", - host, hostHash[host][agent]['last'], hostHash[host][agent]['subtest'], hostHash[host][agent]['total'], agent); - } -} - |