mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 22:39:18 +02:00
send a packet with the exact number of bytes to logstash
This commit is contained in:
parent
a267d5fe9f
commit
90500a8990
1 changed files with 2 additions and 2 deletions
|
@ -130,9 +130,9 @@ int main(int argc, const char* argv[]) {
|
||||||
char logstashPacket[MIXER_LOGSTASH_PACKET_BYTES];
|
char logstashPacket[MIXER_LOGSTASH_PACKET_BYTES];
|
||||||
|
|
||||||
float averageFrameTimePercentage = sumFrameTimePercentages / numStatCollections;
|
float averageFrameTimePercentage = sumFrameTimePercentages / numStatCollections;
|
||||||
sprintf(logstashPacket, "%s %.2f", MIXER_LOGSTASH_METRIC_NAME, averageFrameTimePercentage);
|
int packetBytes = sprintf(logstashPacket, "%s %.2f", MIXER_LOGSTASH_METRIC_NAME, averageFrameTimePercentage);
|
||||||
|
|
||||||
agentList->getAgentSocket()->send(Logstash::socket(), logstashPacket, MIXER_LOGSTASH_PACKET_BYTES);
|
agentList->getAgentSocket()->send(Logstash::socket(), logstashPacket, packetBytes);
|
||||||
|
|
||||||
sumFrameTimePercentages = 0.0f;
|
sumFrameTimePercentages = 0.0f;
|
||||||
numStatCollections = 0;
|
numStatCollections = 0;
|
||||||
|
|
Loading…
Reference in a new issue