(cls, filename: str)
| 35 | |
| 36 | @classmethod |
| 37 | def from_file_name(cls, filename: str) -> 'SnapshotFileNameConfig': |
| 38 | return cls( |
| 39 | snapshot_file=filename + '_snapshot.pickle', |
| 40 | trace_plot_file=filename + '_trace_plot.html', |
| 41 | segment_plot_file=filename + '_segment_plot.html', |
| 42 | segment_flamegraph_file=filename + '_segment_flamegraph.svg', |
| 43 | memory_flamegraph_file=filename + '_memory_flamegraph.svg', |
| 44 | ) |
| 45 | |
| 46 | def list_filenames(self) -> list[str]: |
| 47 | return [getattr(self, field.name) for field in dataclasses.fields(self)] |