1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2015 Google, Inc
11 static int do_dhry(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
13 ulong start, duration, vax_mips;
15 int iterations = 1000000;
18 iterations = simple_strtoul(argv[1], NULL, 10);
22 duration = get_timer(start);
23 dhry_per_sec = lldiv(iterations * 1000ULL, duration);
24 vax_mips = lldiv(dhry_per_sec, 1757);
25 printf("%d iterations in %lu ms: %lu/s, %lu DMIPS\n", iterations,
26 duration, (ulong)dhry_per_sec, vax_mips);
33 "[iterations] - run dhrystone benchmark",
34 "\n - run the Dhrystone 2.1 benchmark, a rough measure of CPU speed\n"