refactor jscMemoryMetrics to use HeapStats
Reviewed By: amnn Differential Revision: D4558963 fbshipit-source-id: 8b729c6ce288d30b8d069be34f9db7572d8b3ec4
This commit is contained in:
parent
6fbc2c9972
commit
a151fce1ca
|
@ -25,6 +25,10 @@ static JSValueRef nativeGetHeapStats(
|
|||
result.setProperty("extra_size", {ctx, Value::makeNumber(ctx, heapStats.extraSize)});
|
||||
result.setProperty("capacity", {ctx, Value::makeNumber(ctx, heapStats.capacity)});
|
||||
result.setProperty("object_count", {ctx, Value::makeNumber(ctx, heapStats.objectCount)});
|
||||
result.setProperty("object_size", {ctx, Value::makeNumber(ctx, heapStats.objectSizeAfterLastCollect)});
|
||||
result.setProperty("object_capacity", {ctx, Value::makeNumber(ctx, heapStats.objectCapacityAfterLastCollect)});
|
||||
result.setProperty("block_size", {ctx, Value::makeNumber(ctx, heapStats.blockSize)});
|
||||
result.setProperty("malloc_size", {ctx, Value::makeNumber(ctx, heapStats.mallocSize)});
|
||||
|
||||
return (JSObjectRef) result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue