[U-Boot] [PATCH] common/cmd_ext_common: measure throughput

Wolfgang Denk wd at denx.de
Wed Oct 17 12:05:43 CEST 2012


Dear Andreas Bießmann,

In message <1350467910-2014-1-git-send-email-andreas.devel at googlemail.com> you wrote:
> This patch adds time measurement and throughput calculation for the ext2load and
> ext4load commands.
...
> +	unsigned long time_start;
...
> +	time_start = get_timer(0);
>  	if (ext4fs_read((char *)addr, filelen) != filelen) {
>  		printf("** Unable to read \"%s\" from %s %d:%d **\n",
>  		       filename, argv[1], dev, part);
>  		ext4fs_close();
>  		goto fail;
>  	}
> +	time_start = get_timer(time_start);

There, "time_start" is clearly a mis-nomer.  How about
s/time_start/time/ ?

> +		print_size(filelen / time_start * 1000, "/s");

Does this give reasonable results for small files, say when loading a
20 byte file ?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"No matter where you go, there you are..."          - Buckaroo Banzai


More information about the U-Boot mailing list