Skip to content

Instantly share code, notes, and snippets.

View hamiltont's full-sized avatar
🕵️‍♂️
huntin' wabbits

Hamilton Turner hamiltont

🕵️‍♂️
huntin' wabbits
View GitHub Profile
@hamiltont
hamiltont / count_tfb_pr.py
Created April 3, 2015 23:47
Count PRs proposed or merged since FrameworkBenchmarks Round 9
from github import Github
from datetime import datetime
import time
# Visit https://github.com/settings/applications
# and issue a new "personal access token"
g = Github("<your own github token>")
round9 = datetime.strptime('2014-03-19 13:07:11', '%Y-%m-%d %H:%M:%S')
@hamiltont
hamiltont / count_tfb_issues.py
Created April 3, 2015 23:33
Count issues created or closed since FrameworkBenchmarks Round 9
from github import Github
from datetime import datetime
import time
# Visit https://github.com/settings/applications
# and issue a new "personal access token"
g = Github("<your own github token>")
round9 = datetime.strptime('2014-03-19 13:07:11', '%Y-%m-%d %H:%M:%S')
@hamiltont
hamiltont / gist:5c9d0e4c88e474721b73
Created March 5, 2015 17:11
TFB R9 repo history shortlog
AOYAMA Kazuharu (5):
Updated to TreeFrog Framework v1.7.5.
Modified to use Prepared Statement, and add setup file for a benchmark of 'thread' MPM.
import a setup file for the treefrog-thread test.
Fix a bug of incorrect response bodies for 'query' request with values of '0', 'foo', and '501'
Fix a bug of missing the additional row added at run-time.
Adam Chlipala (4):
Redid recent Ur/Web changes
Ur/Web: Fix text of fortune added during test
@hamiltont
hamiltont / gist:611280ee96852446de08
Created March 5, 2015 17:11
TFB R9 repository history log
Hamiltons-MacBook-Pro:FrameworkBenchmarks hamiltont$ git log --pretty=format:"%ci,%h,%aN %s" fab6e22..5a27e8f
2014-04-18 10:37:29 +0100,5a27e8f,Christopher Jackson Added Gorail to Benchmark!
2014-03-25 10:58:51 -0700,4eeb803,Mike Smith master Fixed a number of issues with install
2014-03-20 09:53:20 -0700,f48b814,Brian Hauer Revised classification to fullstack.
2014-03-14 12:36:22 -0700,1a254b4,Mike Smith Merge pull request #801 from bclozel/boot-upgrade
2014-03-04 19:26:13 +0100,1c054c5,Brian Clozel Fix and comment Tomcat configuration
2014-03-04 09:37:20 +0100,c2589fe,Brian Clozel Upgrade to Spring Boot 1.0.0.RC4
2014-02-27 08:07:00 -0800,a9989fd,Mike Smith master Locked down the mono version to be run
2014-02-26 15:51:43 -0800,7153209,Mike Smith Merge branch 'master' of github.com:TechEmpower/FrameworkBenchmarks
2014-02-26 15:51:21 -0800,371e7a2,Mike Smith master Fixed the problem with mono installer
@hamiltont
hamiltont / cleanup_media.sh
Created March 2, 2015 04:43
Rapidly set user/group/permission on a large media directory and avoid disk writes
#!/bin/bash
# Ensures user/group/permissions are set for a large directory of
# media, while avoiding needless writes and caching where possible.
# Still has to read all media from disk, so all HDDs will spin up -
# e.g. run this infrequently. It's basically an insurance policy
# to avoid losing media, without the cost of writing to every
# file on your NAS with a recursive chown
#
# Needs to be run as sudo
def __count_sloc(self):
frameworks = gather_frameworks(include=self.test,
exclude=self.exclude, benchmarker=self)
jsonResult = {}
for framework, testlist in frameworks.iteritems():
if not os.path.exists(os.path.join(testlist[0].directory, "source_code")):
logging.warn("Cannot count lines of code for %s - no 'source_code' file", framework)
continue
benchmark: 0% | | Rough ETA: --:--:--
benchmark: 1% | | Rough ETA: 00:00:01
benchmark: 2% | | Rough ETA: 01:12:17
benchmark: 3% |# | Rough ETA: 17:27:56
benchmark: 4% |# | Rough ETA: 20:43:50
benchmark: 5% |## | Rough ETA: 22:15:10
benchmark: 6% |## | Rough ETA: 21:16:02
benchmark: 7% |## | Rough ETA: 21:44:49
benchmark: 8% |### | Rough ETA: 20:18:42
benchmark: 9% |### | Rough ETA: 17:45:24
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 6.
"Dstat 0.7.2 CSV output"
"Author:","Dag Wieers <dag@wieers.com>",,,,"URL:","http://dag.wieers.com/home-made/dstat/"
"Host:","TFB-all",,,,"User:","root"
"Cmdline:","dstat -afilmprsT --aio --fs --ipc --lock --raw --socket --tcp --raw --socket --tcp --udp --unix --vm --disk-util --rpc --rpcd --output results/ec2_100-CPU_1000-RAM_0-SET/20141106170117/json/openresty/stats",,,,"Date:","06 Nov 2014 17:55:21 UTC"
"cpu0 usage",,,,,,"cpu1 usage",,,,,,"dsk/sda",,"net/docker0",,"net/eth0",,"net/lxcbr0",,"paging",,"system",,"interrupts",,,,"load avg",,,"memory usage",,,,"procs",,,"io/sda",,"swap",,"epoch","async","filesystem",,"sysv ipc",,,"file locks",,,,"raw","sockets",,,,,"tcp sockets",,,,,"raw","sockets",,,,,"tcp sockets",,,,,"udp",,"unix sockets",,,,"virtual memory",,,,"sda","rpc client",,,"rpc server",,,,
"usr","sys","idl","wai","hiq","siq","usr","sys","idl","wai","hiq","siq","read","writ","recv","send","recv","send","recv","send","in","out","int","csw","12","19","20","21","1m","5m","15m","used","buff","cach","free
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 5.
"Dstat 0.7.2 CSV output"
"Author:","Dag Wieers <dag@wieers.com>",,,,"URL:","http://dag.wieers.com/home-made/dstat/"
"Host:","8",,,,"User:","root"
"Cmdline:","dstat -afilmprsT --aio --fs --ipc --lock --raw --socket --tcp --raw --socket --tcp --udp --unix --vm --disk-util --rpc --rpcd --output results/fwbmdocker1_100-CPU_18000-RAM_1357911-SET/20141027170409/json/duda/stats",,,,"Date:","27 Oct 2014 21:04:22 UTC"
"cpu0 usage",,,,,,"cpu1 usage",,,,,,"cpu2 usage",,,,,,"cpu3 usage",,,,,,"cpu4 usage",,,,,,"cpu5 usage",,,,,,"cpu6 usage",,,,,,"cpu7 usage",,,,,,"cpu8 usage",,,,,,"cpu9 usage",,,,,,"cpu10 usage",,,,,,"cpu11 usage",,,,,,"cpu12 usage",,,,,,"cpu13 usage",,,,,,"cpu14 usage",,,,,,"cpu15 usage",,,,,,"cpu16 usage",,,,,,"cpu17 usage",,,,,,"cpu18 usage",,,,,,"cpu19 usage",,,,,,"cpu20 usage",,,,,,"cpu21 usage",,,,,,"cpu22 usage",,,,,,"cpu23 usage",,,,,,"dsk/sda",,"net/docker0",,"net/eth0",,"net/lxcbr0",,"paging",,"system",,"interrupts",,,,,,,,,,,"load avg",,,"memory usage",,,,"procs",,,"io/sda",,"swap",,"epoch","a
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 7. in line 1.
"Dstat 0.7.2 CSV output"
"Author:","Dag Wieers <dag@wieers.com>",,,,"URL:","http://dag.wieers.com/home-made/dstat/"
"Host:","6",,,,"User:","root"
"Cmdline:","dstat -afilmprsT --aio --fs --ipc --lock --raw --socket --tcp --raw --socket --tcp --udp --unix --vm --disk-util --rpc --rpcd --output results/dock4-1_correct-TYPE_100-CPU_18000-RAM_13579111315-SET/20141029235234/json/openresty/stats",,,,"Date:","30 Oct 2014 03:52:56 UTC"
"cpu0 usage",,,,,,"cpu1 usage",,,,,,"cpu2 usage",,,,,,"cpu3 usage",,,,,,"cpu4 usage",,,,,,"cpu5 usage",,,,,,"cpu6 usage",,,,,,"cpu7 usage",,,,,,"cpu8 usage",,,,,,"cpu9 usage",,,,,,"cpu10 usage",,,,,,"cpu11 usage",,,,,,"cpu12 usage",,,,,,"cpu13 usage",,,,,,"cpu14 usage",,,,,,"cpu15 usage",,,,,,"cpu16 usage",,,,,,"cpu17 usage",,,,,,"cpu18 usage",,,,,,"cpu19 usage",,,,,,"cpu20 usage",,,,,,"cpu21 usage",,,,,,"cpu22 usage",,,,,,"cpu23 usage",,,,,,"dsk/sda",,"net/docker0",,"net/eth0",,"net/lxcbr0",,"paging",,"system",,"interrupts",,,,,,,,,,,"load avg",,,"memory usage",,,,"procs",,,"io/sda",,