ptvp35/ptvp35/instrumentation.py
2023-05-05 16:13:58 +00:00

17 lines
404 B
Python

import ptvp35
from rainbowadn.instrument import Instrumentation
__all__ = ("InstrumentDiskWrites",)
class InstrumentDiskWrites(Instrumentation):
def __init__(self, /):
super().__init__(ptvp35._File, "write_to_disk_sync")
def on_write(self, line: str, /) -> None:
pass
def instrument(self, method, db, line, /):
self.on_write(line)
return method(db, line)