Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

[TestProf] Optimize models/notification spec #6

Open
palkan opened this issue Aug 19, 2024 · 2 comments · May be fixed by #7
Open

[TestProf] Optimize models/notification spec #6

palkan opened this issue Aug 19, 2024 · 2 comments · May be fixed by #7
Labels
ai-succeeded AI successfully optimized the test test-prof

Comments

@palkan
Copy link
Contributor

palkan commented Aug 19, 2024

File path

spec/models/notification_spec.rb

Copy link

🤖 I'm on it! Let me first collect some profiles for spec/models/notification_spec.rb.

Copy link

🤖 Okay, here is the baseline information for spec/models/notification_spec.rb:

[TEST PROF INFO] FactoryProf enabled (simple mode)
[TEST PROF INFO] RSpecDissect enabled

Run options: exclude {:streaming=>true, :search=>true, :js=>true}

Randomized with seed 44998

Progress: |====================================================================|
[TEST PROF INFO] RSpecDissect report

Total time: 00:12.859

Total `let` time: 00:11.516
Total `before(:each)` time: 00:10.702

Top 5 slowest suites (by `let` time):

Notification (./spec/models/notification_spec.rb:5) – 00:11.516 of 00:12.859 (37)
 ↳ notifications – 45
 ↳ subject – 38
 ↳ status – 4

Top 5 slowest suites (by `before(:each)` time):

Notification (./spec/models/notification_spec.rb:5) – 00:10.702 of 00:12.859 (37)


Finished in 13.55 seconds (files took 16.22 seconds to load)
37 examples, 0 failures

Randomized with seed 44998
[TEST PROF INFO] Factories usage

 Total: 332
 Total top-level: 284
 Total time: 00:11.774 (out of 00:25.919)
 Total uniq factories: 10

   name                    total   top-level     total time      time per call      top-level time

   notification              149         149        4.4576s            0.0299s             4.4576s
   status                     96          48        4.1515s            0.0432s             1.9138s
   favourite                  16          16        1.0413s            0.0651s             1.0413s
   mention                    16          16        1.0443s            0.0653s             1.0443s
   follow                     15          15        0.8127s            0.0542s             0.8127s
   follow_request             15          15        0.6420s            0.0428s             0.6420s
   poll                       15          15        0.7579s            0.0505s             0.7579s
   account                     8           8        0.8680s            0.1085s             0.8680s
   account_warning             1           1        0.0673s            0.0673s             0.0673s
   report                      1           1        0.1692s            0.1692s             0.1692s

@github-actions github-actions bot linked a pull request Aug 19, 2024 that will close this issue
@palkan palkan added the ai-succeeded AI successfully optimized the test label Aug 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ai-succeeded AI successfully optimized the test test-prof
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant