Skip to content

Instantly share code, notes, and snippets.

View dangunter's full-sized avatar
🏠
Working from home

Dan Gunter dangunter

🏠
Working from home
View GitHub Profile
@dangunter
dangunter / taskgraph.py
Created March 15, 2012 16:13
task graph thoughts
"""
Task graph
==========
Some toy code to play with the aspects
of the task-graph problem. Note that this is
all in-memory, but really want to implement so it
can directly manipulate mongodb data.
Initial problem statement
--------------------------
@dangunter
dangunter / stampede-timetest-results.txt
Created March 14, 2012 09:50
Results from a couple of runs of stampede_timetest.py
gp-0.stampede.db
method,time
get_condor_q_time,0.000005
get_descendant_workflow_ids,0.001646
get_failed_job_instances,0.000004
get_invocation_by_time,2.845388
get_invocation_by_time_per_host,4.467101
get_invocation_info,0.000007
@dangunter
dangunter / stampede_timetest.py
Created March 14, 2012 09:24
Timing test of NetLogger Stampede DB functions
import sys, time
from netlogger.analysis.workflow.stampede_statistics import *
st = StampedeStatistics("sqlite:///gp-0.stampede.db")
w="89a25dd1-e8ae-4f15-9dea-367bbf598779"
st.initialize(w)
sys.stdout.write("method,time\n")
for fn in filter(lambda s: s.startswith('get_'), dir(st)):
sys.stdout.write("{},".format(fn))
sys.stdout.flush()
t = time.time()