bmaptool: fix flashing speed calculation
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Mon, 12 Nov 2012 12:12:46 +0000 (14:12 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Mon, 12 Nov 2012 12:12:46 +0000 (14:12 +0200)
We write 'mapped_size' amount of data, not the entire image, so use the correct
variable when calculating the flashing speed.

Change-Id: I68a7eb597c3e29e4c4795ca907d13cdb466e5363
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
bmaptool

index 8f1cd57..2cfc916 100755 (executable)
--- a/bmaptool
+++ b/bmaptool
@@ -116,7 +116,7 @@ def copy_command(args, log):
         raise SystemExit(1)
 
     copying_time = time.time() - start_time
-    copying_speed = writer.bmap_image_size / copying_time
+    copying_speed = writer.bmap_mapped_size / copying_time
     log.info("copying time: %s, copying speed %s/sec" \
              % (BmapHelpers.human_time(copying_time), \
                 BmapHelpers.human_size(copying_speed)))