|
|
|
|
@ -148,7 +148,7 @@ static void statistics(struct lab *lab, uint64_t id, int loads) {
|
|
|
|
|
if (stream_member_online(lab->inst, lab->group, lab->inst->node_id)) { |
|
|
|
|
printf("\"%" PRIu64 "\"", lab->inst->node_id); separator = 1; |
|
|
|
|
} |
|
|
|
|
for (struct ll_entry *e = loads && group ? group->nodes->head : NULL; e; e = e->next) { |
|
|
|
|
for (struct ll_entry *e = group ? group->nodes->head : NULL; e; e = e->next) { |
|
|
|
|
struct TOPO_GROUP_NODE *node = (struct TOPO_GROUP_NODE *)e; |
|
|
|
|
if (stream_member_online(lab->inst, lab->group, node->node_id)) { |
|
|
|
|
printf("%s\"%" PRIu64 "\"", separator++ ? "," : "", node->node_id); |
|
|
|
|
@ -197,7 +197,7 @@ static void statistics(struct lab *lab, uint64_t id, int loads) {
|
|
|
|
|
printf("}"); |
|
|
|
|
} |
|
|
|
|
printf("],\"peer_load\":["); separator = 0; |
|
|
|
|
for (struct ll_entry *e = group ? group->nodes->head : NULL; e; e = e->next) { |
|
|
|
|
for (struct ll_entry *e = loads && group ? group->nodes->head : NULL; e; e = e->next) { |
|
|
|
|
struct TOPO_GROUP_NODE *node = (struct TOPO_GROUP_NODE *)e; |
|
|
|
|
struct stream_peer_load_info load; |
|
|
|
|
if (stream_peer_get_load(lab->inst, node->node_id, &load) != STREAM_OK) continue; |
|
|
|
|
|