Skip to content

Optimize rspec tests#12422

Merged
koic merged 1 commit intorubocop:masterfrom
fatkodima:optimize-tests
Dec 1, 2023
Merged

Optimize rspec tests#12422
koic merged 1 commit intorubocop:masterfrom
fatkodima:optimize-tests

Conversation

@fatkodima
Copy link
Contributor

Did a simple profiling of rspec tests.
Got

TOTAL    (pct)     SAMPLES    (pct)     FRAME
34229  (17.1%)       20146  (10.1%)     Psych::Parser#_native_parse <==========
13387   (6.7%)        7628   (3.8%)     RuboCop::Cop::Registry#cops_for_department
 6845   (3.4%)        6845   (3.4%)     (marking)
 6372   (3.2%)        6372   (3.2%)     (sweeping)
 5304   (2.7%)        5304   (2.7%)     Kernel#`
52086  (26.1%)        5027   (2.5%)     Class#new
 4999   (2.5%)        4999   (2.5%)     String#match?
 8569   (4.3%)        4262   (2.1%)     RuboCop::YAMLDuplicationChecker.traverse
 6471   (3.2%)        4032   (2.0%)     Parser::Lexer#advance
 3533   (1.8%)        3489   (1.7%)     IO.read
 3071   (1.5%)        3071   (1.5%)     File.expand_path

Before, tests run is around 5m15s, after - around 4m20s.

@koic koic merged commit 3db23fa into rubocop:master Dec 1, 2023
@fatkodima fatkodima deleted the optimize-tests branch December 1, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants