~/talk

Peering into the black box: tips for visualizing your program's behavior

Talkat PyOhio 2016 · 2016-07-30..07-31· [observability, developer-experience]
links:none on file
slides:none on file

Shows concrete techniques: use IPython formatted stack traces instead of one-line traces, open frames in unstack vim plugin, add a decorator that logs function calls and returns (with fold markers so editors collapse call contexts), use Python's trace/coverage to discover dead code (example: a cache path never ran due to a typo), dump line-level traces into a DB with smiley for postmortem queries, generate call graphs and flame charts with d3 to find hot or unexpectedly-called functions, and diff two traces to find where executions diverge.

AI-written summary · about

  1. 0:00Intro
  2. 2:09The problem
  3. 2:35Looking at the code
  4. 2:55Stack traces
  5. 5:29Why are stack traces so common
  6. 6:05Stack traces in logs
  7. 6:55Write a decorator
  8. 9:20Log exceptions
  9. 10:18Folding logs
  10. 12:08Debugging
  11. 13:27Logging
  12. 14:20Getting started
  13. 14:45Your Code as a Crime Scene
  14. 15:31D3 Visualization Library
  15. 16:18Bash Oneliner
  16. 16:56Call Graph
  17. 17:34Make your own graphs
  18. 17:54Generating graphs
  19. 18:11Other features
  20. 18:39Project example
  21. 20:17Flame charts
  22. 22:22Problems with debugging
  23. 23:37Shortterm fixes
  24. 24:12Longterm fixes
  25. 26:46The bare minimum
  26. 27:56Logs
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.