Skip to content

Instantly share code, notes, and snippets.

@iht
Last active November 21, 2020 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iht/50f90a7d18091705658ed40ba50bc3f9 to your computer and use it in GitHub Desktop.
Save iht/50f90a7d18091705658ed40ba50bc3f9 to your computer and use it in GitHub Desktop.
Aggregate the output of Beam profiling and produce sorted file
import os
import pstats
directory = 'profiling'
files = [ '%s/%s' % (directory, x) for x in os.listdir('%s/' % directory)]
p = pstats.Stats(*files)
p.sort_stats('cumulative').dump_stats('dataflow.prof')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment