Skip to content

Commit ff8d277

Browse files
committed
Add data as debug annotations to pftrace
1 parent 70b7434 commit ff8d277

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

preciceprofiling/common.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,13 @@ def groupFor(name):
259259
entry.name = name
260260
pkt.sequence_flags = TracePacket.SEQ_NEEDS_INCREMENTAL_STATE
261261

262+
# add data
263+
if e.data:
264+
for key, value in json.loads(e.data).items():
265+
annotation = pkt.track_event.debug_annotations.add()
266+
annotation.name = key
267+
annotation.int_value = value
268+
262269
# end leftover events
263270
for a in active:
264271
pkt = builder.add_packet()

0 commit comments

Comments
 (0)