[PATCH] D95084: [lld][benchmark] Be tolerant of optional metric units in output

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 12:53:39 PST 2021


int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added subscribers: lebedev.ri, mgorny.
Herald added a reviewer: lebedev.ri.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

... and set up a test scaffolding so we can verify the behavior.

It seems that the `perf` on my machine does emit the `mses` unit for
task-clock, hence this fix.

Note that `perf stat` has an `-x` flag that will output things in an
easy-to-parse CSV-like format, but that flag will cause things like
the 'seconds time elapsed' data to be omitted, which is why I didn't
take that route here.

P.S. I'm barely familiar with CMake, so I just copied the stuff from
clang/bindings/python/tests/CMakeLists.txt which also has a python unit
test.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95084

Files:
  lld/test/CMakeLists.txt
  lld/unittests/CMakeLists.txt
  lld/unittests/test_benchmark.py
  lld/utils/benchmark.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95084.317981.patch
Type: text/x-patch
Size: 4081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210120/66e1c975/attachment.bin>


More information about the llvm-commits mailing list