Ask questionschanging precisionBits doesn't result in change in precision of stored value

Describe the bug I want to store the value of 64 bit unsigned integers (from network interface packet counters) into VictoriaMetrics, while I am evaluating using it vs Influxdb. I am aware that some loss of precision will be incurred by converting the integer to a float, however adjusting the precisionBits argument does not seem to have any effect on the precision of the stored value.

To Reproduce Steps to reproduce the behavior Start the victoriaMetrics docker image. docker run -it --rm -p 8429:8428 victoriametrics/victoria-metrics Write a value, with e.g. curl -d 'test,tag1=value1,tag2=value2 value=18446744073670737131 1571113986843174000' -X POST 'http://localhost:8429/write' start the docker image with a different precision, e.g. docker run -it --rm -p 8429:8428 victoriametrics/victoria-metrics -precisionBits 20 write the same value to it curl -d 'test,tag1=value1,tag2=value2 value=18446744073670737131 1571113986843174000' -X POST 'http://localhost:8429/write'

Any time you query these values back, it gives you the same response.

curl -G 'http://localhost:8429/api/v1/export' -d 'match={__name__!=""}'

Expected behavior The precision of the returned value should vary with the provided precisionBits value every time I read it back. However, it does not.


$ docker run -it --rm -p 8429:8428 victoriametrics/victoria-metrics --version

Additional context While influxdb can store these as uint64s, even when I store it as a float in Influx, it only rounds it to the nearest 1000. VictoriaMetrics is rounding my values to the nearest 10,000,000, which makes calculating rates from these counters very inaccurate. Is the precisionBits flag working at the moment? I need the precision to be able to match Influx at least.


Answer questions valyala

Let's keep this issue open until the next release.

Github User Rank List