Skip to content

RSpec: Show time overall spent creating factories per run

Peter Leitzen requested to merge pl-test-prof-nate-heckler into master

What does this MR do and why?

This commit enables the "Nate Heckler" mode for test-prof to print to following summary after each run:

[TEST PROF INFO] Time spent in factories: 04:31.222 (54% of total time)

This is to encourage us to fix your factories as soon as possible.

See https://test-prof.evilmartians.io/#/profilers/factory_prof?id=instructions

Refs #373184 (comment 1096642633)

Screenshots or screen recordings

Last line of

bin/rspec spec/models/key_spec.rb
Screenshot_from_2022-09-14_12-55-49

How to set up and validate locally

bin/rspec spec/models/key_spec.rb

Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 27958

Test environment set up in 5.58437905 seconds
..........................................................................................

Finished in 11.22 seconds (files took 6.39 seconds to load)
90 examples, 0 failures

Randomized with seed 27958

[TEST PROF INFO] Time spent in factories: 00:01.353 (11.48% of total time)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports