profile
viewpoint

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__!=""}'
{"metric":{"__name__":"test_value","tag1":"value1","tag2":"value2"},"values":[18446744073670000000],"timestamps":[1571113986843]}

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.

Version

$ docker run -it --rm -p 8429:8428 victoriametrics/victoria-metrics --version
victoria-metrics-20191009-135259-tags-v1.28.0-0-gf6334bff

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.

VictoriaMetrics/VictoriaMetrics

Answer questions valyala

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

useful!
source:https://uonfu.com/
Github User Rank List