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

Default timestamp in CSV files should be Unix Time #310

Open
zhenyun opened this issue Feb 18, 2015 · 7 comments
Open

Default timestamp in CSV files should be Unix Time #310

zhenyun opened this issue Feb 18, 2015 · 7 comments
Assignees

Comments

@zhenyun
Copy link
Contributor

zhenyun commented Feb 18, 2015

currently after naarad processing, the timestamp is epoch time (e.g.,, 132455555), we should use unix time (e.g., 2014-03-02 22:11:11).

If we really want epoch time in some cases, we can use config file to specify.

@richardhsu richardhsu changed the title default timestamp in csv file should be Unix Time Default timestamp in CSV files should be Unix Time Feb 19, 2015
@richardhsu
Copy link
Contributor

This sounds reasonable to me so that CSV files are more readable. This will add some overhead on write as all timestamps need to be translated.

This will affect both the generation of CSV files and also must look into the JavaScript code that touches the download of the CSV file as that I think converts timestamps as well.

@richardhsu richardhsu added this to the Sprint 02/19/15 - 03/05/15 milestone Feb 19, 2015
@feng-tao
Copy link
Contributor

In naarad, every timestamp will translate into epoch time in naarad.utils.get_standardized_timestamp. We could change this function to use unix time instead of epoch time. But the trickiest thing is that plot library(e.g matplotlib) uses the csv file to plot graph and it only recognizes epoch time. It will trigger exception if the csv time series is not epoch time. Any advise for the fix?

@zhenyun
Copy link
Contributor Author

zhenyun commented Mar 27, 2015

The goal of the "filed issue" is to store Unix time in *.csv file (for easy human reading afterwards).
In naarad, the unix time needs to be translated to epoch time for plotting.


From: feng-tao [[email protected]]
Sent: Thursday, March 26, 2015 6:08 PM
To: linkedin/naarad
Cc: Zhenyun Zhuang
Subject: Re: [naarad] Default timestamp in CSV files should be Unix Time (#310)

In naarad, every timestamp will translate into epoch time in naarad.utils.get_standardized_timestamp. We could change this function to use unix time instead of epoch time. But the trickiest thing is that plot library(e.g matplotlib) uses the csv file to plot graph and it only recognizes epoch time. It will trigger exception if the csv time series is not epoch time. Any advise for the fix?


Reply to this email directly or view it on GitHubhttps://github.com//issues/310#issuecomment-86779393.

@richardhsu
Copy link
Contributor

Matplotlib can handle unix timestamps, do you have documentation when it cannot? I believe, I tried to just have the CSV files have the same timestamps as logs and it seemed to graph correctly. I can try to dig that up another time.

I think the biggest issue, the last time I looked at this, was that there are timezone details to deal with as well.

@feng-tao feng-tao mentioned this issue Mar 27, 2015
@feng-tao
Copy link
Contributor

Figure out the issue. I just push the initial fix which works on my example sar configure file. So now the csv file will show unix time and graph is generated correctly. I dont think the time zone is an issue as it shows up correctly in my test. But I may be wrong.

@feng-tao
Copy link
Contributor

BTW, the fix combines for both bug #277 and bug #310 . Do you think I need to separate them?

@feng-tao feng-tao self-assigned this Mar 27, 2015
@richardhsu richardhsu mentioned this issue Mar 27, 2015
@feng-tao
Copy link
Contributor

Push a second fix(#328) per Richard's comment

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

No branches or pull requests

3 participants