Add a stat for blobs stored.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4133 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-01-18 22:52:54 +00:00
parent 3285d93576
commit 85a2bc3f0f
5 changed files with 20 additions and 2 deletions

View File

@ -738,6 +738,7 @@ static JSValue _tf_task_getStats(JSContext* context, JSValueConst this_val, int
tf_ssb_get_stats(task->_ssb, &ssb_stats);
JS_SetPropertyStr(context, result, "messages_stored", JS_NewInt32(context, ssb_stats.messages_stored));
JS_SetPropertyStr(context, result, "blobs_stored", JS_NewInt32(context, ssb_stats.blobs_stored));
JS_SetPropertyStr(context, result, "rpc_in", JS_NewInt32(context, ssb_stats.rpc_in));
JS_SetPropertyStr(context, result, "rpc_out", JS_NewInt32(context, ssb_stats.rpc_out));
JS_SetPropertyStr(context, result, "requests", JS_NewInt32(context, ssb_stats.request_count));