CyberDem0n / bg_mon

Background worker for monitoring PostgreSQL
MIT License
66 stars 11 forks source link

Keep appgregated statistics in memory for the past X minutes #17

Closed CyberDem0n closed 4 years ago

CyberDem0n commented 5 years ago

All JSON documents are stored in the array. Every minute the new array is open and the old one is closed. In order to store it efficiently, brotli compression is used. Tests showed that the compression ratio for the 60 points of data is up to 30 and even higher. Most of the modern browsers have the support of brotli encoding out of the box, therefore aggregated data, if requested, is always sent compressed, with Content-Encoding: br. Firefox has brotli compression disabled for non-https connections, but it can be enabled in about:config

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.6%) to 89.047% when pulling 3fa713ffb467ca5faab0183b52af00543641b80e on feature/aggregate into 1a8eb90310f74601c5e9b3d53ec3a4dfed8bb177 on master.