Tweaking memory stats and trying to figure out why startup got so much slower.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3828 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -725,13 +725,14 @@ static JSValue _tf_task_getStats(JSContext* context, JSValueConst this_val, int
|
||||
|
||||
JS_SetPropertyStr(context, result, "idle_percent", JS_NewFloat64(context, task->idle_percent));
|
||||
|
||||
uint64_t total_memory = uv_get_total_memory();
|
||||
size_t rss;
|
||||
if (uv_resident_set_memory(&rss) == 0)
|
||||
{
|
||||
JS_SetPropertyStr(context, result, "rss", JS_NewInt64(context, rss));
|
||||
JS_SetPropertyStr(context, result, "memory_percent", JS_NewFloat64(context, 100.0f * rss / total_memory));
|
||||
}
|
||||
|
||||
JS_SetPropertyStr(context, result, "sqlite3_mem_used", JS_NewInt64(context, sqlite3_memory_used()));
|
||||
JS_SetPropertyStr(context, result, "sqlite3_memory_percent", JS_NewFloat64(context, 100.0f * sqlite3_memory_used() / total_memory));
|
||||
|
||||
if (task->_ssb)
|
||||
{
|
||||
|
Reference in New Issue
Block a user