Record validated stream bench runs and explicit RPC error diagnostics
This commit is contained in:
1 parent
89c6482a96
commit
b8f8818eef
2 files changed
+25
No files matched your search
@@ -63,6 +63,7 @@ static void json_string(const char *value) {
|
||||
}
|
||||
|
||||
static void reply(uint64_t id, int result) {
|
||||
if (result < 0) DEBUG_WARN(DEBUG_CATEGORY_STREAM, "lab: RPC failed id=%" PRIu64 " rc=%d", id, result);
|
||||
printf("{\"id\":%" PRIu64 ",\"rc\":%d}\n", id, result);
|
||||
}
|
||||
|
||||
@@ -236,6 +237,7 @@ static void statistics(struct lab *lab, uint64_t id, int loads) {
|
||||
static void invite_ready(void *arg, int result, const char *link) {
|
||||
struct lab *lab = arg;
|
||||
lab->invite = NULL;
|
||||
if (result) DEBUG_WARN(DEBUG_CATEGORY_STREAM, "lab: invite failed id=%" PRIu64 " rc=%d", lab->invite_id, result);
|
||||
printf("{\"id\":%" PRIu64 ",\"rc\":%d,\"link\":", lab->invite_id, result);
|
||||
json_string(link ? link : ""); printf("}\n");
|
||||
}
|
||||
@@ -256,6 +258,7 @@ static void command(struct lab *lab, const char *json) {
|
||||
struct TOPO_GROUP *group = (struct TOPO_GROUP *)e;
|
||||
if (group->group_type == TOPO_GROUP_TYPE_CHAT) { lab->group = group->group_id; break; }
|
||||
}
|
||||
if (!lab->group) DEBUG_ERROR(DEBUG_CATEGORY_STREAM, "lab: CHAT group creation failed id=%" PRIu64, id);
|
||||
printf("{\"id\":%" PRIu64 ",\"rc\":%d,\"group\":\"%" PRIu64 "\"}\n", id, lab->group ? 0 : -1, lab->group); return;
|
||||
}
|
||||
if (!strcmp(operation, "invite")) {
|
||||
|
||||
Reference in new issue
Block a user