• Bruce Dawson's avatar
    Improve canned checks output · ab2e7f8f
    Bruce Dawson authored
    When CheckLongLines finds problems it prints the first five, but this
    gives no indication as to whether there are just five, or hundreds.
    This change prints the number of long lines found.
    
    The snapshot function in PanProjectChecks prints the elapsed time for
    long checks, however it has two issues that make it inconvenient. One is
    that it prints the time in ms which sounds great until you get a warning
    that one of the checks is taking 2041373 ms (not kidding, although now
    fixed) which is tricky to read. The other problem is that it was
    actually measuring CPU time, not wall-clock time. This changes it to
    print the time in seconds (to 0.1 seconds) and to measure elapsed
    time.
    
    Bug: 1309977
    Change-Id: I7564a8cdf7bb3349b10ebbddbfe179188d4bf309
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3587726Reviewed-by: 's avatarGavin Mak <gavinmak@google.com>
    Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
    ab2e7f8f
presubmit_canned_checks.py 71.2 KB