Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
dcdb
dcdb
Commits
26c1eb85
Commit
26c1eb85
authored
Dec 18, 2018
by
Michael Ott
Browse files
Use new SensorDataStore::insertBatch() function to improve CollectAgent ingress rate
parent
76aaf386
Changes
1
Hide whitespace changes
Inline
Side-by-side
CollectAgent/collectagent.cpp
View file @
26c1eb85
...
...
@@ -201,11 +201,14 @@ int mqttCallback(SimpleMQTTMessage *msg)
}
cout << endl;
#endif
std
::
list
<
DCDB
::
SensorDataStoreReading
>
readings
;
for
(
uint64_t
i
=
0
;
i
<
len
/
sizeof
(
mqttPayload
);
i
++
)
{
mySensorDataStore
->
insert
(
&
sid
,
payload
[
i
].
timestamp
,
payload
[
i
].
value
);
DCDB
::
SensorDataStoreReading
r
(
sid
,
payload
[
i
].
timestamp
,
payload
[
i
].
value
);
readings
.
push_back
(
r
);
mySensorCache
.
storeSensor
(
sid
,
payload
[
i
].
timestamp
,
payload
[
i
].
value
);
}
mySensorDataStore
->
insertBatch
(
readings
);
//mySensorCache.dump();
}
#if 1
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment