Skip to content

Instantly share code, notes, and snippets.

@gak
Created May 29, 2013 03:53
Show Gist options
  • Save gak/5667859 to your computer and use it in GitHub Desktop.
Save gak/5667859 to your computer and use it in GitHub Desktop.
test
def colourize_node(calls, total_time):
value = float(total_time * 2 + calls) / 3
return '%f %f %f' % (value / 2 + .5, value, 0.9)
def colourize_edge(calls, total_time):
value = float(total_time * 2 + calls) / 3
return '%f %f %f' % (value / 2 + .5, value, 0.7)
def reset_settings():
global settings
global graph_attributes
global __version__
settings = {
'node_attributes': {
'label': r'%(func)s\ncalls: %(hits)i\ntotal time: %(total_time)f\ntotal memory in: %(total_memory_in)f\ntotal memory out: %(total_memory_out)f',
'color': '%(col)s',
},
'node_colour': colourize_node,
'edge_colour': colourize_edge,
'dont_exclude_anything': False,
'include_stdlib': True,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment