[PATCH] test/py: Add a report show test durations
Tom Rini
trini at konsulko.com
Sat Jan 25 19:30:25 CET 2025
On Sat, Jan 25, 2025 at 10:14:05AM -0700, Simon Glass wrote:
> Hi Tom,
>
> On Fri, 24 Jan 2025 at 12:21, Tom Rini <trini at konsulko.com> wrote:
> >
> > On Fri, Jan 24, 2025 at 11:56:04AM -0700, Simon Glass wrote:
> >
> > > Execution time varies widely with the existing tests. Provides a summary
> > > of the time taken for each test, along with a histogram.
> > >
> > > Example:
> > >
> > > Duration : Number of tests
> > > ======== : ========================================
> > > <1ms : 1
> > > <8ms : 1
> > > <20ms : # 20
> > > <30ms : ######## 127
> > > <50ms : ######################################## 582
> > > <75ms : ####### 102
> > > <100ms : ## 39
> > > <200ms : ##### 86
> > > <300ms : # 29
> > > <500ms : ## 42
> > > <750ms : # 16
> > > <1.0s : # 15
> > > <2.0s : # 23
> > > <3.0s : 13
> > > <5.0s : 9
> > > <7.5s : 1
> > > <10.0s : 6
> > > <20.0s : 12
> > >
> > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > > ---
> > >
> > > test/py/conftest.py | 77 +++++++++++++++++++++++++++++++++++++++++++++
> > > 1 file changed, 77 insertions(+)
> >
> > Whitespace issues aside,
>
> Do you mean the blank lines? pylint wants those for top-level items.
That's weird but OK.
> we should probably not do this every time, just
> > when requested.
>
> I'd like to see it on each run, actually. It doesn't take any time to
> calculate and it lets us see where the time is going.
We already print the full time, and I think knowing what the tests are
that take so long, so that we can see if there's anything to do about
it, would be more helpful. The general feedback about our pytests today
is they're already too verbose in the normal case.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250125/0b918618/attachment.sig>
More information about the U-Boot
mailing list