This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Combine perf data metrics from several files
ClosedPublic

Authored by kpdev42 on Nov 29 2021, 10:23 PM.

Details

Summary

Metrics are recorded to files test.perf_data, test.perf_data1, …
Parse all these files into a single dictionary.

OS Laboratory. Huawei Russian Research Institute. Saint-Petersburg

Diff Detail

Repository
rLNT LNT

Event Timeline

kpdev42 created this revision.Nov 29 2021, 10:23 PM
kpdev42 requested review of this revision.Nov 29 2021, 10:23 PM
cmatthews requested changes to this revision.Dec 7 2021, 11:35 AM
cmatthews added inline comments.
lnt/testing/profile/perf.py
16

It would be nice to add a type annotation here, so we can find issues before hitting "assert False" in production.

16

I think this should be "merge_recursivly", to be pep8 compliant.

Does this pass flake8?

Can you add a doc comment.

Can you add a small unit test for this.

24

I don't like assert False, especially with no extra logging. It will be hard to debug if we hit in production. How about raise a ValueError or TypeError or NotImplementedYet, and in the message. mention the types responsible for the error ?

55

This functionality needs a unit test.

55

Could this glob be any more specific?

This revision now requires changes to proceed.Dec 7 2021, 11:35 AM
kpdev42 updated this revision to Diff 392730.Dec 8 2021, 5:56 AM

Addressed some comments

kpdev42 marked 5 inline comments as done.Dec 13 2021, 1:08 AM
kpdev42 added inline comments.
lnt/testing/profile/perf.py
55

Could you please clarify a little bit - how this test should looks like? Because glob.glob("%s*" % f) where f - is (e.g.) somefile.perf_data just returns all somefile.perf_data* files

55

Could this glob be any more specific?

I think no, because name of profile file can be quite different

kpdev42 marked 2 inline comments as done.Jan 12 2022, 1:45 AM

Ping

@cmatthews Hi, could you please review latest changes?

cmatthews accepted this revision.Mar 2 2022, 10:03 AM

LGTM now. Thanks!

This revision is now accepted and ready to land.Mar 2 2022, 10:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2022, 10:03 AM
This revision was automatically updated to reflect the committed changes.