datastax / cassandra-quarkus

An Apache Cassandra(R) extension for Quarkus
Apache License 2.0
40 stars 28 forks source link

[JAVA-2734] Implement HdrHistogram compatible with MicroProfile #40

Closed adutra closed 4 years ago

adutra commented 4 years ago

Imported from [JAVA-2734](https://datastax-oss.atlassian.net/browse/JAVA-2734), originally reported by tomekl007 on Thu, 9 Apr 2020 10:13:05 GMT.


After [https://datastax-oss.atlassian.net/browse/JAVA-2694](https://datastax-oss.atlassian.net/browse/JAVA-2694) we re-implemented the metrics to work with MicroProfile.

The MicroProfileMetricsUpdater.initializeTimer method was simplified, and the current does not use custom HdrHistogram implementation and ignores driver parameters that control that, ie:

DefaultDriverOption.METRICS_SESSION_CQL_REQUESTS_HIGHEST,
DefaultDriverOption.METRICS_SESSION_CQL_REQUESTS_DIGITS,
DefaultDriverOption.METRICS_SESSION_CQL_REQUESTS_INTERVAL);

We should re-implement the HdrHistogram in the MicroProfile to keep the optimized logic.

We can use TimerImpl class that takes the Reservoir as an argument. The Reservoir should be implemented with a custom logic that mimics the HdrHistogram from java-driver.

┆Issue is synchronized with this Jira Task by Unito

adutra commented 4 years ago

This should wait for JAVA-2808.

tomekl007 commented 4 years ago

This should be implemented in the driver