Skip to content

Commit

Permalink
small improvements to warning-system
Browse files Browse the repository at this point in the history
  • Loading branch information
orgua committed Dec 4, 2023
1 parent 8e64709 commit b3c6148
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion software/python-package/shepherd_sheep/h5_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,15 @@ def write_buffer(self, buffer: DataBuffer) -> None:
] = buffer.gpio_edges.values # noqa: PD011, false positive
self.gpio_pos = gpio_new_pos

if (buffer.util_mean > 95) or (buffer.util_max > 100):
if (buffer.util_mean > 98) or (buffer.util_max > 100):
self._logger.warning(
"WARNING: timing critical, pru0 Loop-Util: mean = %d %%, max = %d %%",
buffer.util_mean,
buffer.util_max,
)
# TODO: store pru-util? probably yes
# TODO: do not save continuous timestamps anymore
# but instead: buffer-timestamp, sample-count, pru-util mean & max

def start_monitors(
self,
Expand Down
1 change: 1 addition & 0 deletions software/python-package/shepherd_sheep/shared_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ def read_buffer(self, index: int, verbose: bool = False) -> DataBuffer:
pru0_util_mean,
pru0_util_max,
)
# TODO: this is causing high overhead without a cape
elif verbose:
log.info(
"Pru0 Loop-Util: mean = %d %%, max = %d %%",
Expand Down

0 comments on commit b3c6148

Please sign in to comment.