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
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
@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
@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 / 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 / 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 / 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 / avatars.py
Last active August 29, 2015 14:19
Making TFB Video
#!/usr/bin/python
import re
import os
import urllib
# See https://github.com/gridaphobe/pyGravatar
from gravatar import Gravatar
adir='avatars'
if not os.path.exists(adir):
INFO:root:Running setup module start (cwd=/home/vagrant/FrameworkBenchmarks/frameworks/Clojure/compojure)
INFO:root:To run compojure manually, copy/paste this:
export FWROOT=/home/vagrant/FrameworkBenchmarks && \
export TROOT=/home/vagrant/FrameworkBenchmarks/frameworks/Clojure/compojure && \
export IROOT=/home/vagrant/FrameworkBenchmarks/installs && \
export DBHOST=127.0.0.1 && \
export LOGDIR=/home/vagrant/FrameworkBenchmarks/results/ec2/latest/logs/compojure && \
export MAX_THREADS=2 && \
cd /home/vagrant/FrameworkBenchmarks/frameworks/Clojure/compojure && \
sudo -u testrunner -E -H stdbuf -o0 -e0 bash -ex setup.sh
Hamiltons-MacBook-Pro:linux hamiltont$ cat fw_depends
#!/bin/bash
source $FWROOT/toolset/setup/linux/bash_functions.sh
fw_depends "$@"
Hamiltons-MacBook-Pro:linux hamiltont$
zeromq is installed!
/home/vagrant/FrameworkBenchmarks/installs /home/vagrant/FrameworkBenchmarks/installs
Cloning into 'nawak'...
remote: Counting objects: 155, done.
remote: Total 155 (delta 0), reused 0 (delta 0), pack-reused 155
Receiving objects: 100% (155/155), 391.69 KiB | 0 bytes/s, done.
Resolving deltas: 100% (69/69), done.
Checking connectivity... done.
Note: checking out 'b34b0b5077541ae9671957452a70e2578894d3a8'.