newrelic platform - sum of squares or square of total? -


according https://newrelic.com/docs/plugin-dev/metric-data-for-the-plugin-api plugins should report sum of squares specified period. taking @ json example, i'd more square of total value. e.g.:

{   "name": "primary mysql database",   "guid": "com.your_company_name.plugin_name",   "duration" : 60,   "metrics" : {     "component/productiondatabase[queries/second]": 100,     "component/analyticsdatabase[queries/second]": {       "min" : 2,       "max" : 10,       "total": 12,       "count" : 2,       "sum_of_squares" : 144     }   } } 

obviously there 2 values, 2 , 10. according sample sum_of_squares (10+2)^2=144 define "square of total". me however, term "sum of squares" 2^2+10^2=104.

so when taking multi-value metrics - 1 correct number?

you're absolutely right example values documented incorrect. i'll notify relevant parties update documentation.

in common case single metric value being reported, count (1), in case squaring "total" value yields correct result.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -