This is an archive of the discontinued LLVM Phabricator instance.

[libc] Display unit test runtime for hosted environments
ClosedPublic

Authored by gchatelet on May 22 2023, 7:00 AM.

Details

Summary

With more tests added to LLVM libc each week we want to keep track of unittest's runtime, especially for low end build bots.

Top offender can be tracked with a bit of scripting (spoiler alert, mem function sweep tests are in the top ones)

ninja check-libc | grep "ms)" | awk '{print $(NF-1),$0}' | sort -nr | cut -f2- -d' '

Unfortunately this doesn't work for hermetic tests since clock is unavailable.

Diff Detail

Event Timeline

gchatelet created this revision.May 22 2023, 7:00 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 22 2023, 7:00 AM
gchatelet requested review of this revision.May 22 2023, 7:00 AM
sivachandra accepted this revision.May 22 2023, 10:04 PM
sivachandra added inline comments.
libc/test/UnitTest/LibcTest.cpp
167

clock() return value wraps around after every N minutes. Should we check if clock() return value here is greater than start_time? If not, report "Unknown - try rerunning"?

This revision is now accepted and ready to land.May 22 2023, 10:04 PM
gchatelet edited the summary of this revision. (Show Details)May 23 2023, 1:27 AM
gchatelet updated this revision to Diff 524611.May 23 2023, 1:42 AM
gchatelet marked an inline comment as done.
  • Address comments
gchatelet updated this revision to Diff 524624.May 23 2023, 2:13 AM
  • rebase / reformat
gchatelet updated this revision to Diff 524625.May 23 2023, 2:14 AM
  • remove extra empty line
This revision was landed with ongoing or failed builds.May 23 2023, 2:23 AM
This revision was automatically updated to reflect the committed changes.