Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timestamp output facility to tlog-play #305

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jeriksson
Copy link

This patch adds the interactive command 'T' to tlog-play. Hitting 'T' during playback enables timestamp output. Whenever playback is paused, a timestamp is output on the console. This timestamp can then be used with -g on the command line to restart playback at the paused location.

@jeriksson
Copy link
Author

Also, hitting T again disables timestamp output.

@jeriksson
Copy link
Author

FWIW, the failed check looks unrelated to this patch. The program builds just fine - something seem to be up with the build environment for the rpm.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 28.903% when pulling 7854a95 on jeriksson:master into 960c8d5 on Scribery:master.

@justin-stephenson
Copy link
Collaborator

Thanks for the PR!

Could you please add this timestamp output into the tlog-play man page also? It would be great if this can be added as a general tlog-play option(maybe --pause-timestamp) to allow enabling this functionality on initialization with a command-line option, similar to other options like --paused.

It would be appreciated if you can move the timespec conversion code in tlog_play_run into a function named tlog_timespec_to_timestr in lib/tlog/timestr.c. Please use macros with helpful names as opposed to magic numbers 60 and 3600 in the code.

Lastly, squash all the commits into a single commit to add this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants