From f110ed2db7b08f19122525a34186a585921e0b49 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Tue, 8 Oct 2019 00:17:23 -0700 Subject: [PATCH] Show export numbers Summary: As discussed on an earlier diff, the percentage alone is a confusing indicator as the number of items to be serialised can grow over time, causing the percentage to go down. This shows the raw numbers in addition to the percentage. Reviewed By: priteshrnandgaonkar Differential Revision: D17762477 fbshipit-source-id: 8911b520b2ea74542bc64e6a6662bed7d4f81860 --- src/utils/serialization.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/serialization.tsx b/src/utils/serialization.tsx index 9845e7e3f..66c3006af 100644 --- a/src/utils/serialization.tsx +++ b/src/utils/serialization.tsx @@ -196,7 +196,11 @@ export async function makeObjectSerializable( stack.length >= prevStackLength ? stack.length - prevStackLength + 1 : 0; const percentage = (numIterations / accumulator) * 100; statusUpdate && - statusUpdate(`Serializing Flipper (${percentage.toFixed(2)}%) `); + statusUpdate( + `Serializing Flipper: ${numIterations} / ${accumulator} (${percentage.toFixed( + 2, + )}%) `, + ); prevStackLength = stack.length; } return dict.get(obj);