forked from cory/tildefriends
Hook up some stats from the SSB side.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3822 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
11
src/task.c
11
src/task.c
@ -730,6 +730,17 @@ static JSValue _tf_task_getStats(JSContext* context, JSValueConst this_val, int
|
||||
{
|
||||
JS_SetPropertyStr(context, result, "rss", JS_NewInt64(context, rss));
|
||||
}
|
||||
|
||||
if (task->_ssb)
|
||||
{
|
||||
tf_ssb_stats_t ssb_stats = { 0 };
|
||||
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, "rpc_in", JS_NewInt32(context, ssb_stats.rpc_in));
|
||||
JS_SetPropertyStr(context, result, "rpc_out", JS_NewInt32(context, ssb_stats.rpc_out));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user