[libc-commits] [PATCH] D154446: [libc] Support timing information in libc tests
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Jul 5 12:02:24 PDT 2023
jhuber6 added inline comments.
================
Comment at: libc/test/UnitTest/LibcTest.cpp:159
+ (duration * 1000 * 1000 * 1000) / CLOCKS_PER_SEC;
+ if (duration_ms != 0)
+ tlog << duration_ms << " ms)\n";
----------------
JonChesterfield wrote:
> Overflow hazards abound here. I'm not totally sure what to do about them.
These are `uint64_t`, if these overflow I think we'll be fine for just running some unit tests and getting a time that says 0ms instead of a few trillion.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154446/new/
https://reviews.llvm.org/D154446
More information about the libc-commits
mailing list