Skip to content

Commit

Permalink
Merge branch 'master' into fix_energy_when_not_recording
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B authored Dec 17, 2024
2 parents 0c5c1f1 + deb5059 commit b8385ba
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(
"""
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 int 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 @@ -225,5 +225,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 b8385ba

Please sign in to comment.