You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/02/04 12:37:00 UTC

[jira] [Commented] (DISPATCH-1586) Add allocator stats to the set of exported prometheus metrics

    [ https://issues.apache.org/jira/browse/DISPATCH-1586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17278804#comment-17278804 ] 

ASF GitHub Bot commented on DISPATCH-1586:
------------------------------------------

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:
users@infra.apache.org


> Add allocator stats to the set of exported prometheus metrics
> -------------------------------------------------------------
>
>                 Key: DISPATCH-1586
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1586
>             Project: Qpid Dispatch
>          Issue Type: Improvement
>            Reporter: Gordon Sim
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org