reprospect.tools.nsys.cacher module
- class reprospect.tools.nsys.cacher.Cacher(*, directory: str | Path | None = None)View on GitHub
Bases:
CacherCacher tailored to
nsysresults.nsysruns require quite some time to acquire results.On a cache hit, the cacher will serve:
.nsys-repfile.sqlitefile
On a cache miss,
nsysis launched and the cache entry populated accordingly.Note
It is assumed that hashing is faster than running
nsysitself.Warning
The cache should not be shared between machines, since there may be differences between machines that influence the results but are not included in the hashing.
- __init__(*, directory: str | Path | None = None)View on GitHub
- static export_to_sqlite(command: Command, entry: Entry, **kwargs) PathView on GitHub
Export report to
.sqlite.
- hash(**kwargs) blake3View on GitHub
- hash_impl(*, command: Command) blake3View on GitHub
Hash based on:
nsysversionnsysoptions (but not the output files)executable content
executable arguments
linked libraries
environment
- populate(directory: Path, **kwargs) NoneView on GitHub
When there is a cache miss, call
reprospect.tools.nsys.session.Session.run(). Fill the directory with the artifacts.
- run(command: Command, **kwargs) EntryView on GitHub
On a cache hit, copy files from the cache entry.