Simon Buhrow has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/47805 )
Change subject: cli_classic.c: Add runtime measurement ......................................................................
cli_classic.c: Add runtime measurement
To get an fast and easy feedback on how parameters effect runtime (e.g. clock setting, polling delays, ...).
Signed-off-by: Simon Buhrow simon.buhrow@posteo.de Change-Id: I2238b3f3e6c2ab7745994662a88787fa2e86d480 --- M cli_classic.c 1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/05/47805/1
diff --git a/cli_classic.c b/cli_classic.c index ae7f6ef..0d5381f 100644 --- a/cli_classic.c +++ b/cli_classic.c @@ -24,6 +24,7 @@ #include <string.h> #include <stdlib.h> #include <getopt.h> +#include <time.h> #include "flash.h" #include "flashchips.h" #include "fmap.h" @@ -142,6 +143,7 @@ /* Probe for up to eight flash chips. */ struct flashctx flashes[8] = {{0}}; struct flashctx *fill_flash; + struct timespec time_start, time_end; const char *name; int namelen, opt, i, j; int startchip = -1, chipcount = 0, option_index = 0, force = 0, ifd = 0, fmap = 0; @@ -528,6 +530,8 @@ /* FIXME: Delay calibration should happen in programmer code. */ myusec_calibrate_delay();
+ timespec_get(&time_start, TIME_UTC); + if (programmer_init(prog, pparam)) { msg_perr("Error: Programmer initialization failed.\n"); ret = 1; @@ -806,6 +810,9 @@ for (i = 0; i < chipcount; i++) free(flashes[i].chip);
+ timespec_get(&time_end, TIME_UTC); + msg_gdbg("Runtime: %d:%2d min:s\n", (int)((time_end.tv_sec-time_start.tv_sec) / 60), (int)(time_end.tv_sec-time_start.tv_sec) % 60); + layout_cleanup(&include_args); free(filename); free(fmapfile);
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/47805
to look at the new patch set (#2).
Change subject: cli_classic.c: Add runtime measurement ......................................................................
cli_classic.c: Add runtime measurement
To get an fast and easy feedback on how parameters effect runtime (e.g. clock setting, polling delays, ...).
Signed-off-by: Simon Buhrow simon.buhrow@posteo.de Change-Id: I2238b3f3e6c2ab7745994662a88787fa2e86d480 --- M cli_classic.c 1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/05/47805/2
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/47805 )
Change subject: cli_classic.c: Add runtime measurement ......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/c/flashrom/+/47805/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/47805/2//COMMIT_MSG@9 PS2, Line 9: effect affect
https://review.coreboot.org/c/flashrom/+/47805/2//COMMIT_MSG@9 PS2, Line 9: an fast a fast
Idwer Vollering has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/47805 )
Change subject: cli_classic.c: Add runtime measurement ......................................................................
Patch Set 2: Code-Review+1
[x] Build and runtime tested on Freebsd The formatting could be optimized to be parseable, though.
Hello build bot (Jenkins), Idwer Vollering,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/47805
to look at the new patch set (#3).
Change subject: cli_classic.c: Add runtime measurement ......................................................................
cli_classic.c: Add runtime measurement
To get a fast and easy feedback on how parameters affect runtime (e.g. clock setting, polling delays, ...).
Signed-off-by: Simon Buhrow simon.buhrow@posteo.de Change-Id: I2238b3f3e6c2ab7745994662a88787fa2e86d480 --- M cli_classic.c 1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/05/47805/3
Simon Buhrow has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/47805 )
Change subject: cli_classic.c: Add runtime measurement ......................................................................
Patch Set 3:
Patch Set 2: Code-Review+1
[x] Build and runtime tested on Freebsd The formatting could be optimized to be parseable, though.
Thanks for your feedback! Which format do you prefer? I just chose any.