elastic / elastic/logstash

`org.logstash.Timestamp` Seems Redundant?

Open
#7,897 8 comments 0 reactions 0 assignees View on GitHub
code cleanup discuss performance improvements
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

`org.logstash.Timestamp` holds no state beyond the `org.joda.time.DateTime` it wraps.
It seems the only point of having it around is to format timestamps a certain way and facilitate serialization via `org.logstash.json.TimestampSerializer`?

Both the formatting of the timestamp as well as the serialization in a certain format can be achieved by other (faster and 0GC) means from a `long`.
Is there any reason to keep this class around and not replace it with a less heavy approach?

(same goes for related logic around `org.logstash.ext.JrubyTimestampExtLibrary` and the `BiValue` we have for this one)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.