Closed vicenteg closed 7 years ago
Yes, makes sense - I was struggling with a sensible way to select between seconds and milliseconds. I'll give it a shot and send a new PR.
On Monday, October 31, 2016, Ted Dunning notifications@github.com wrote:
What do you think about adding two new format characters? (q for milliseconds to match String.format and ? something else for seconds) Dealing with these formats would be done with an if much like what you just provided.
The rationale is that
1) this is really just a formatting thing any what
2) we need both seconds and milliseconds since epoch.
On Mon, Oct 31, 2016 at 12:48 PM, Vince Gonzalez <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:
You can view, comment on, or merge this pull request online at:
https://github.com/tdunning/log-synth/pull/27 Commit Summary
- update ArrivalSampler to optionally create events with millis since epoch
- remove unused Instant import
File Changes
- M README.md https://github.com/tdunning/log-synth/pull/27/files#diff-0 (4)
- M src/main/java/com/mapr/synth/samplers/ArrivalSampler.java https://github.com/tdunning/log-synth/pull/27/files#diff-1 (16)
Patch Links:
- https://github.com/tdunning/log-synth/pull/27.patch
- https://github.com/tdunning/log-synth/pull/27.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tdunning/log-synth/pull/27, or mute the thread https://github.com/notifications/unsubscribe-auth/ AAPSehtWmVaOIvfqlMQvaCUIq8zpzNJAks5q5kYrgaJpZM4KlbXK .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tdunning/log-synth/pull/27#issuecomment-257449196, or mute the thread https://github.com/notifications/unsubscribe-auth/ABDECM7V7GQW4GZ2B7r8LXICG6Ki_qtSks5q5njFgaJpZM4KlbXK .
I already have a change ready to check in.
There are four Samplers that need the change. I created a FancyDateFormat class that accepts a format that can consist of just Q or s for millisecond and second respectively. If format is not that then it uses SimpleDateFormat.
Sent from my iPhone
On Nov 1, 2016, at 14:02, Vince Gonzalez notifications@github.com wrote:
Yes, makes sense - I was struggling with a sensible way to select between seconds and milliseconds. I'll give it a shot and send a new PR.
On Monday, October 31, 2016, Ted Dunning notifications@github.com wrote:
What do you think about adding two new format characters? (q for milliseconds to match String.format and ? something else for seconds) Dealing with these formats would be done with an if much like what you just provided.
The rationale is that
1) this is really just a formatting thing any what
2) we need both seconds and milliseconds since epoch.
On Mon, Oct 31, 2016 at 12:48 PM, Vince Gonzalez <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:
You can view, comment on, or merge this pull request online at:
https://github.com/tdunning/log-synth/pull/27 Commit Summary
- update ArrivalSampler to optionally create events with millis since epoch
- remove unused Instant import
File Changes
- M README.md https://github.com/tdunning/log-synth/pull/27/files#diff-0 (4)
- M src/main/java/com/mapr/synth/samplers/ArrivalSampler.java https://github.com/tdunning/log-synth/pull/27/files#diff-1 (16)
Patch Links:
- https://github.com/tdunning/log-synth/pull/27.patch
- https://github.com/tdunning/log-synth/pull/27.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tdunning/log-synth/pull/27, or mute the thread https://github.com/notifications/unsubscribe-auth/ AAPSehtWmVaOIvfqlMQvaCUIq8zpzNJAks5q5kYrgaJpZM4KlbXK .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tdunning/log-synth/pull/27#issuecomment-257449196, or mute the thread https://github.com/notifications/unsubscribe-auth/ABDECM7V7GQW4GZ2B7r8LXICG6Ki_qtSks5q5njFgaJpZM4KlbXK .
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Oh, ok. Feel free to reject this PR then if yours already does what I'm trying to do.
What do you think about adding two new format characters? (q for milliseconds to match String.format and ? something else for seconds) Dealing with these formats would be done with an if much like what you just provided.
The rationale is that
1) this is really just a formatting thing any what
2) we need both seconds and milliseconds since epoch.
On Mon, Oct 31, 2016 at 12:48 PM, Vince Gonzalez notifications@github.com wrote: