legate.util.benchmark.BenchmarkLogFromFilename#
- class legate.util.benchmark.BenchmarkLogFromFilename(
- file_name: os.PathLike[str],
- constructor: Callable[[TextIO], BenchmarkLog],
Wrap a
BenchmarkLogin a context that also opens a file.- __init__(
- file_name: os.PathLike[str],
- constructor: Callable[[TextIO], BenchmarkLog],
Create a context manager that opens a file for a
BenchmarkLog.This class exists so
benchmark_log()can conditionally open output files, most users should use that function and not call this directly.- Parameters:
file_name (os.PathLike[str]) – The path for the file to open.
constructor (Callable[[TextIO], BenchmarkLog]) – Thunk for creating a
BenchmarkLogfrom the file handle that was opened fromfile_name.
Attributes
Methods