Closed alwqx closed 4 years ago
influxdb_cpp::server_info si(host, port, db, "","");
string resp;
influxdb_cpp::builder builder;
influxdb_cpp::detail::ts_caller *caller = nullptr;
for (int i = 0; i < n ;i++) {
if (caller) {
caller = &caller->meas("m")
.tag("t", a[i])
.field("f", b[i]);
} else {
caller = &builder.meas("m")
.tag("t", a[i])
.field("f", b[i]);
}
}
if (caller) {
int result = caller->post_http(si, &resp);
}
Hi, @orca-zhang thanks for you awesome working.
I want to insert 1000 series per second. Your README says:
It's not good when I have 1000 series which means I will write code likes:
I wonder if you plan to add multiple insert in loop likes:
I try to add this feature by add
\n
tolines_
but failed. My code is: