Generate profiles in pprof format. See https://github.com/google/pprof/blob/master/proto/profile.proto for pprof proto format. Args: graph: A `Graph` object. run_metadata: A `RunMetadata` proto. Returns: A dictionary mapping from device name to pprof proto for that device.
(graph, run_metadata)
| 387 | |
| 388 | |
| 389 | def get_profiles(graph, run_metadata): |
| 390 | """Generate profiles in pprof format. |
| 391 | |
| 392 | See https://github.com/google/pprof/blob/master/proto/profile.proto |
| 393 | for pprof proto format. |
| 394 | |
| 395 | Args: |
| 396 | graph: A `Graph` object. |
| 397 | run_metadata: A `RunMetadata` proto. |
| 398 | |
| 399 | Returns: |
| 400 | A dictionary mapping from device name to pprof proto for that device. |
| 401 | """ |
| 402 | return PprofProfiler(graph, run_metadata).profile() |
| 403 | |
| 404 | |
| 405 | def profile(graph, run_metadata, output_dir=None): |
no test coverage detected