Skip to content

Commit

Permalink
fix: allow to use realtime instead of logical time for export_to_sing…
Browse files Browse the repository at this point in the history
…le_file

The usage of logical time does not currently play well with log replay,
as replayed input streams get their real time updated but not their
real time.
  • Loading branch information
doudou committed Nov 7, 2024
1 parent 2873876 commit 1038621
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/syskit/log/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,8 @@ def raw_html(html)
# @param [Boolean] upgrade if true, the data types are upgraded to their
# latest representation. Set to false to keep them as-is. This can be
# controlled by calling `.upgrade` on the streams in the block
def export_to_single_file(path, *streams, upgrade: true)
def export_to_single_file(path, *streams, use_realtime: false, upgrade: true)
path = Pathname(path)
log_file = Pocolog::Logfiles.create(path.to_s)
return if streams.empty?

Expand All @@ -827,7 +828,7 @@ def export_to_single_file(path, *streams, upgrade: true)

log_file_streams =
DSL.export_to_single_file_create_output_streams(log_file, builders)
joint_stream = Pocolog::StreamAligner.new(false, *samples)
joint_stream = Pocolog::StreamAligner.new(use_realtime, *samples)
DSL.export_to_single_file_process(
builders, log_file_streams, joint_stream
)
Expand Down

0 comments on commit 1038621

Please sign in to comment.