[autotest] Improve performance on result size collection.

1. Don't do a deepcopy for result info of new directories.
2. Delay updating parent result info's size information.
3. Add metrics for the collect_result_sizes call.

BUG=chromium:781066
TEST=unittest

Change-Id: I0b13d8641d1cdfc46c503822f41e25088245f37d
Reviewed-on: https://chromium-review.googlesource.com/753974
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Dan Shi <dshi@google.com>
Reviewed-by: Allen Li <ayatane@chromium.org>
diff --git a/server/site_utils.py b/server/site_utils.py
index d408248..51cede7 100644
--- a/server/site_utils.py
+++ b/server/site_utils.py
@@ -949,6 +949,8 @@
                                    fields=fields)
 
 
+@metrics.SecondsTimerDecorator(
+        'chromeos/autotest/result_collection/collect_result_sizes_duration')
 def collect_result_sizes(path, log=logging.debug):
     """Collect the result sizes information and build result summary.