-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add support for all CLP FFI functionality and refactor existing code: #3
Conversation
- Add all clp-ffi functions - Add reader and writer - Add unit tests - Add formatting and linting - Overhaul doc strings and terminology
… the header when used with a c++ compiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the first batch of comments on cpp decoder/deserializer implementations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Headers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments about the workflow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments on the README
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comments on cpp implementations of encoders and serializers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments on the wildcard query C++ implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments on ffi/ffi.go
. All about the doc strings.
- fix typos - update NamespaceIndentation to None - add [[nodiscard]] - typedef -> using - add const - use fancy auto syntax Co-authored-by: Lin Zhihao <[email protected]>
- drop static cast Co-authored-by: Lin Zhihao <[email protected]>
Co-authored-by: Lin Zhihao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the cpp standard, for dependent names we need typename
disambiguator to explicitly tell the compiler this is a type name: https://en.cppreference.com/w/cpp/language/dependent_name
Even though the code still gets compiled in some compilers without typename
, it is a good practice to add it anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments on ir/writer.go
and ir/serializer.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments on:
- ir/ir.go
- ir/decoder.go
- ir/deserializer.go
- search/wildcard_query.go
// streams through CLP's FFI (foreign function interface). More details on CLP | ||
// IR streams are described in this [Uber blog]. | ||
// Log events in IR format can be viewed in the [log viewer] or programmatically | ||
// analyzed using APIs provided in this package. | ||
// | ||
// [CLP]: https://github.com/y-scope/clp | ||
// [Uber blog]: https://www.uber.com/blog/reducing-logging-cost-by-two-orders-of-magnitude-using-clp/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically this line exceeds 100 chars. If wrapping it into a new line doesn't break the doc site we should do it
} | ||
|
||
// A timestamp interval of [m_lower, m_upper). | ||
type TimestampInterval struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we provide a way to create a default timestamp interval that covers the entire supported timestamp range?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unnecessary as constructing the equivalent struct would also only be one line of code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But do we have TS_MIN and TS_MAX defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would these be different from int min/max?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we defined the timestamp type to EpochTimeMs
instead of explicitly using int. It might not be obvious for users what underlying type it is. It also introduces problems if we change the underlying type in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments on ir/reader.go
Improves/rewrites/fixes many doc strings Co-authored-by: Lin Zhihao <[email protected]>
…max time interval.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a multi-line commit message like this PR: y-scope/clp#301
how about: Add all CLP FFI functionality and refactor existing code: (#3)
|
Description
Validation performed
Note, this is the same as #2 but from the beta branch to de-duplicate branches.