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

[TestProf] Optimize requests/accounts spec #3

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

[TestProf] Optimize requests/accounts spec #3

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

Comments

@palkan
Copy link
Contributor

palkan commented Aug 19, 2024

File path

./spec/requests/accounts_spec.rb

Copy link

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

Copy link

🤖 Okay, here is the baseline information for spec/requests/accounts_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 30481

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

Total time: 00:10.309

Total `let` time: 00:05.489
Total `before(:each)` time: 00:09.258

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

Accounts show response (./spec/requests/accounts_spec.rb:5) – 00:05.489 of 00:10.309 (22)
 ↳ account – 93
 ↳ status_media – 42
 ↳ status_private – 42

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

Accounts show response (./spec/requests/accounts_spec.rb:5) – 00:09.258 of 00:10.309 (22)


Finished in 10.86 seconds (files took 16.76 seconds to load)
22 examples, 0 failures

Randomized with seed 30481
[TEST PROF INFO] Factories usage

 Total: 241
 Total top-level: 241
 Total time: 00:06.006 (out of 00:23.723)
 Total uniq factories: 5

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

   status                    193         193        3.9232s            0.0203s             3.9232s
   account                    25          25        1.4652s            0.0586s             1.4652s
   media_attachment           19          19        0.5313s            0.0280s             0.5313s
   tag                         3           3        0.0612s            0.0204s             0.0612s
   user                        1           1        0.0258s            0.0258s             0.0258s

Copy link

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

Copy link

🤖 Okay, here is the baseline information for spec/requests/accounts_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 44833

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

Total time: 00:10.845

Total `let` time: 00:05.482
Total `before(:each)` time: 00:09.586

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

Accounts show response (./spec/requests/accounts_spec.rb:5) – 00:05.482 of 00:10.845 (22)
 ↳ account – 93
 ↳ status_media – 42
 ↳ status_private – 42

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

Accounts show response (./spec/requests/accounts_spec.rb:5) – 00:09.586 of 00:10.845 (22)


Finished in 11.42 seconds (files took 17.51 seconds to load)
22 examples, 0 failures

Randomized with seed 44833
[TEST PROF INFO] Factories usage

 Total: 241
 Total top-level: 241
 Total time: 00:06.025 (out of 00:24.625)
 Total uniq factories: 5

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

   status                    193         193        3.9063s            0.0202s             3.9063s
   account                    25          25        1.4831s            0.0593s             1.4831s
   media_attachment           19          19        0.5626s            0.0296s             0.5626s
   tag                         3           3        0.0426s            0.0142s             0.0426s
   user                        1           1        0.0309s            0.0309s             0.0309s

@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