Skip to content

Commit

Permalink
merged in master
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Dec 6, 2024
2 parents cc6e3d2 + deb5059 commit 7e04ddd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 17 additions & 2 deletions spinn_front_end_common/interface/provenance/provenance_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,28 @@ def insert_monitor(self, x: int, y: int, description: str,
"""
Inserts data into the `monitor_provenance` table.
Will only save data is write_provance is on.
:param int x: X coordinate of the chip
:param int y: Y coordinate of the chip
:param str description: type of value
:param int the_value: data
"""
if get_config_bool("Reports", "write_provenance"):
self.insert_monitor_value(x, y, description, the_value)

def insert_monitor_value(
self, x: int, y: int, description: str, the_value: _SqliteTypes):
"""
Inserts data into the `monitor_provenance` table.
Always saves the data even if write_provence is off.
:param int x: X coordinate of the chip
:param int y: Y coordinate of the chip
:param str description: type of value
:param the_value: data
"""
if not get_config_bool("Reports", "write_provenance"):
return
self.execute(
"""
INSERT INTO monitor_provenance(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,5 +227,5 @@ def _deduce_sdram_requirements_per_timer_tick(self) -> int:

def __write_recording_metadata(self, placement: Placement) -> None:
with ProvenanceWriter() as db:
db.insert_monitor(
db.insert_monitor_value(
placement.x, placement.y, PROVENANCE_CORE_KEY, placement.p)

0 comments on commit 7e04ddd

Please sign in to comment.