fgiorgetti commented on a change in pull request #696:
URL: https://github.com/apache/qpid-dispatch/pull/696#discussion_r570189303
##########
File path: src/http-libwebsockets.c
##########
@@ -522,11 +611,35 @@ static bool write_stats(uint8_t **position, const uint8_t
* const end, const cha
}
}
+static bool write_allocator_stats(uint8_t **position, const uint8_t * const
end, const char* name, allocator_field field)
+{
+ //18 chars + 2*name + 2*(field+6) + 20 chars for int
+ size_t length = 18 + strlen(name)*2 + strlen(field.name)*2 + 20;
+ if (end - *position >= length) {
+ *position += lws_snprintf((char*) *position, end - *position, "# TYPE
%s:%s_bytes gauge\n", name, field.name);
+ *position += lws_snprintf((char*) *position, end - *position,
"%s:%s_bytes %lu\n", name, field.name, field.value);
Review comment:
Ok!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]