17 lines
404 B
Python
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)
|