Menu

#15 Inconsistent date format in process monitors

v1.0 (example)
open-accepted
None
5
2019-03-09
2016-09-26
No

We're using PySys partly for performance testing, including the ProcessMonitor class to monitor CPU and memory usage, and a part of our tests parses the timestamp in the first column of the ProcessMonitor output, which requires us knowing the exact format. We run our tests on both Windows and Linux and have found that the format string is different on each platform's implementation of ProcessMonitor ("%d/%m/%y %H:%M:%S" on Windows and "%m/%d/%y %H:%M:%S" on Linux, with the month/day flipped).

We're on 1.1, though I see this issue is not yet patched in 1.2, the current latest version. Easy enough to patch on our own, but of course preferable to have it rolled into a future version. Thanks!

Discussion

  • Moray Grieve

    Moray Grieve - 2016-09-26

    I would propose we use the international format yyyy-mm-dd - any objections?

     

    Last edit: Moray Grieve 2016-09-26
  • Ben Spiller

    Ben Spiller - 2018-09-17

    Yes we should do that. The tricky bit is how to fix it without breaking existing projects. Do we need to add a project setting for it (woudl work, but feels like overkill to pollute the default project with that). Could maybe conditionalize on the requires-pysys version from the project, to allow older projects to work but newer ones to get the new behaviour? Suggestions welcome

     
  • Ben Spiller

    Ben Spiller - 2019-03-09
    • status: open --> open-accepted
     

Log in to post a comment.

MongoDB Logo MongoDB