-
Notifications
You must be signed in to change notification settings - Fork 12
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 toTSV method #97
Comments
Benchmark in Enrich:
Results with
|
I encourage you to implement private val EnrichedFields =
classOf[EnrichedEvent].getDeclaredFields
.filterNot(_.getName.equals("pii"))
.map { field => field.setAccessible(true); field }
.toList
def tabSeparatedEnrichedEvent(enrichedEvent: EnrichedEvent): String =
EnrichedFields
.map { field =>
val prop = field.get(enrichedEvent)
if (prop == null) "" else prop.toString
}
.mkString("\t") It is how it implemented in FS2 Enrich. |
Also worth adding some fields to the |
With this implementation :
Results for
|
Results with the manual implementation with
Only 2x improvement |
Results with the manual implementation with
A little bit better |
In order to convert
Event
back to TSV.We can write a property-based test with Event -> TSV -> Event check.
The text was updated successfully, but these errors were encountered: