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