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

fix(#34) Add support for logging unix Timestamp #35

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tonythomas01
Copy link

What kind of change does this PR introduce?

  • [✖] Bugfix
  • [✔] Feature
  • [✖] Code style update
  • [✖] Refactor
  • [✖] Build-related changes
  • [✖] Other, please describe

Does this PR introduce a breaking change?

  • [✖] No
  • [✔] Yes

Testing procedure

Case 1

  1. Use --use-unix-ts while running psrecrod
  2. Also try out the plot and log

Review and Merge

Who

  • [✔] Last approver merges
  • [✖] Pull request creator merges

Changelog

Note

  • I havent tested this actually. Probably need unit tests

@tonythomas01
Copy link
Author

okey I tested this, works - but I would love to see a unit test on it.

@tonythomas01
Copy link
Author

tonythomas01 commented Jun 10, 2018

Can someone add some directions on how to run tests etc ?. Hmm. got it from the travis runs.

Copy link
Owner

@astrofrog astrofrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request! Just a comment below about the naming of the argument and the behavior.

For tests, take a look at e.g. this test:

https://github.com/astrofrog/psrecord/blob/master/psrecord/tests/test_main.py#L51

To run tests locally, install the pytest package and do:

pytest psrecord

@@ -90,6 +90,10 @@ def main():
'in a slower maximum sampling rate).',
action='store_true')

parser.add_argument('--use-unix-ts',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though it would be a little more verbose, I think I'd prefer --include-timestamp and make it so that it simply adds a column (e.g. at the start) rather than replace the relative time.

@geoff-va
Copy link

geoff-va commented May 1, 2019

Would you be opposed to just including the timestamp by default as well as the elapsed time? Both have their value and it's not really any more work to include them both.

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.

3 participants