Skip to content
This repository was archived by the owner on Jun 29, 2023. It is now read-only.
This repository was archived by the owner on Jun 29, 2023. It is now read-only.

Improve additional field type discovery #121

@mp911de

Description

@mp911de

Right now, additional fields (string/double-typed) in discovery mode have a high cost of type discovery because states are communicated using exceptions.

A benchmark proves this cost:

Benchmark                                   Mode  Cnt     Score    Error  Units
GelfMessageBenchmark.configuredDoubleField  avgt    5    52,522 ±  1,848  ns/op
GelfMessageBenchmark.configuredLongField    avgt    5    36,982 ±  0,614  ns/op
GelfMessageBenchmark.configuredStringField  avgt    5    18,341 ±  0,324  ns/op
GelfMessageBenchmark.discoverDoubleField    avgt    5  1520,149 ± 88,000  ns/op
GelfMessageBenchmark.discoverLongField      avgt    5    25,537 ±  0,131  ns/op
GelfMessageBenchmark.discoverStringField    avgt    5  2714,702 ± 49,806  ns/op

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions