1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2015 Google, Inc
12 static int do_dhry(struct cmd_tbl *cmdtp, int flag, int argc,
15 ulong start, duration, vax_mips;
17 int iterations = 1000000;
20 iterations = dectoul(argv[1], NULL);
24 duration = get_timer(start);
25 dhry_per_sec = lldiv(iterations * 1000ULL, duration);
26 vax_mips = lldiv(dhry_per_sec, 1757);
27 printf("%d iterations in %lu ms: %lu/s, %lu DMIPS\n", iterations,
28 duration, (ulong)dhry_per_sec, vax_mips);
35 "[iterations] - run dhrystone benchmark",
36 "\n - run the Dhrystone 2.1 benchmark, a rough measure of CPU speed\n"