[llvm][fix] Inclusive language: replace master with main in find_interesting_reviews.pyAs part of using inclusive language within the llvm project and to fixthe command because the master branch w
[llvm][fix] Inclusive language: replace master with main in find_interesting_reviews.pyAs part of using inclusive language within the llvm project and to fixthe command because the master branch was renamed, this patch replacesmaster with main in `find_interesting_reviews.py`.Reviewed By: kristof.beylsDifferential Revision: https://reviews.llvm.org/D113918
show more ...
[find_interesting_reviews.py] Add git blame output cacheThe majority of the running time of this script tends to be spent inrunning git blame on source files touched by patches under review.By i
[find_interesting_reviews.py] Add git blame output cacheThe majority of the running time of this script tends to be spent inrunning git blame on source files touched by patches under review.By introducing a git blame output cache, some of the git blame commandsdon't have to re-run, and the blame information can be retrieved from acache.I've observed that in a typical run matching patches available forreview with potential reviewers, this speeds up the script's runningtime by a factor of about 2.5x.
find_interesting_reviews.py: adapt to github monorepo
find_interesting_reviews.py: avoid crash on non-ascii data.
Python compat - iteritems() vs. items()Always use `items()` and introduce extra `list(...)` call when needed.Differential Revision: https://reviews.llvm.org/D56257llvm-svn: 350312
Python compat - print statementMake sure all print statements are compatible with Python 2 and Python3 usingthe `from __future__ import print_function` statement.Differential Revision: https://r
Python compat - print statementMake sure all print statements are compatible with Python 2 and Python3 usingthe `from __future__ import print_function` statement.Differential Revision: https://reviews.llvm.org/D56249llvm-svn: 350307
Make email options of find_interesting_reviews more flexible.This enables a few requested improvements on the original review of thisscript at https://reviews.llvm.org/D46192.This introduces 2 n
Make email options of find_interesting_reviews more flexible.This enables a few requested improvements on the original review of thisscript at https://reviews.llvm.org/D46192.This introduces 2 new command line options:* --email-report: This option enables specifying who to email the generated report to. This also enables not sending any email and only printing out the report on stdout by not specifying this option on the command line.* --sender: this allows specifying the email address that will be used in the "From" email header.I believe that with these options the script starts having the basicfeatures needed to run it well on a regular basis for a group ofdevelopers.Differential Revision: https://reviews.llvm.org/D47930llvm-svn: 335948
Avoid UnicodeEncodeError on non-ascii reviewer names... by using unicode instead of byte strings where non-ascii strings can beformatted in.llvm-svn: 334098
Add Script to match open Phabricator reviews with potential reviewers.At the last EuroLLVM, I gave a lightning talk about code reviewstatistics on Phabricator reviews and what we could derive from
Add Script to match open Phabricator reviews with potential reviewers.At the last EuroLLVM, I gave a lightning talk about code reviewstatistics on Phabricator reviews and what we could derive from thatto try and reduce waiting-for-review bottlenecks. (seehttps://llvm.org/devmtg/2018-04/talks.html#Lightning_2).One of the items I pointed to is a script we've been using internallyfor a little while to try and match open Phabricator reviews to peoplewho might be able to review them well. I received quite a few requeststo share that script, so here it is.Warning: this is prototype quality!The script uses 2 similar heuristics to try and match open reviews withpotential reviewers:If there is overlap between the lines of code touched by thepatch-under-review and lines of code that a person has written, thatperson may be a good reviewer.If there is overlap between the files touched by the patch-under-reviewand the source files that a person has made changes to, that person maybe a good reviewer.The script provides a percentage for each of the above heuristics andemails a summary. For example, a summary I received a few weeks agofrom the script is the following:SUMMARY FOR [email protected] (found 8 reviews):[3.37%/41.67%] https://reviews.llvm.org/D46018 '[GlobalISel][IRTranslator] Split aggregates during IR translation' by Amara Emerson[0.00%/100.00%] https://reviews.llvm.org/D46111 '[ARM] Enable misched for R52.' by Dave Green[0.00%/50.00%] https://reviews.llvm.org/D45770 '[AArch64] Disable spill slot scavenging when stack realignment required.' by Paul Walker[0.00%/40.00%] https://reviews.llvm.org/D42759 '[CGP] Split large data structres to sink more GEPs' by Haicheng Wu[0.00%/25.00%] https://reviews.llvm.org/D45189 '[MachineOutliner][AArch64] Keep track of functions that use a red zone in AArch64MachineFunctionInfo and use that instead of checking for noredzone in the MachineOutliner' by Jessica Paquette[0.00%/25.00%] https://reviews.llvm.org/D46107 '[AArch64] Codegen for v8.2A dot product intrinsics' by Oliver Stannard[0.00%/12.50%] https://reviews.llvm.org/D45541 '[globalisel] Update GlobalISel emitter to match new representation of extending loads' by Daniel Sanders[0.00%/6.25%] https://reviews.llvm.org/D44386 '[x86] Introduce the pconfig/enclv instructions' by Gabor BuellaThe first percentage in square brackets is the percentage of lines inthe patch-under-review that changes lines that I wrote. The secondpercentage is the percentage of files that I made at least somechanges to out of all of the files touched by the patch-under-review.Both the script and the heuristics are far from perfect, but I'veheard positive feedback from the few colleagues the script has beensending a summary to every day - hearing that this does help them toquickly find patches-under-review they can help to review.The script takes quite some time to run (I typically see it runningfor 2 to 3 hours on weekdays when it gets started by a cron job earlyin the morning). There are 2 reasons why it takes a long time:The REST api into Phabricator isn't very efficient, i.e. a lot ofuninteresting data needs to be fetched. The script tries to reduce thisoverhead partly by caching info it has fetched on previous runs, so asto not have to refetch lots of Phabricator state on each run.The script uses git blame to find for each line of code in the patch whowrote the original line of code being altered. git blame issloooowww....Anyway - to run this script:First install a virtualenv as follows (using Python2.7 - Python3 isalmost certainly not going to work at the moment):$ virtualenv venv$ . ./venv/bin/activate$ pip install PhabricatorThen to run the script, looking for open reviews that could be done by[email protected], run (in the venv):$ python ./find_interesting_reviews.py [email protected]Please note that "[email protected]" needs to be the exact email address(capitalization is important) that the git LLVM repository knows theperson as. Multiple email addresses can be specified on the commandline. Note that the script as is will email the results to all emailaddresses specified on the command line - so be careful not to spampeople accidentally!Differential Revision: https://reviews.llvm.org/D46192llvm-svn: 332711