influx-batch-sender
buffer message and send them in a bulk.
useage
const Sender = require('../index');
const sender = new Sender({
host: 'influxd.yoho.cn',
db: 'web-apm',
measurement: 'api-duration',
duration: 2000,
records:200
});
setInterval(() => {
sender.addMessage({
tags: {
reqid: 'sdasda'+Math.random(),
route: 'test'
},
fields: {
dasd: "d123asda"
}
});
}, Math.random() * 100)