Skip to content

[Rspec] Track execution times with formatter#229

Merged
ArturT merged 16 commits intomasterfrom
rspec-time-tracker
Nov 29, 2023
Merged

[Rspec] Track execution times with formatter#229
ArturT merged 16 commits intomasterfrom
rspec-time-tracker

Conversation

@3v0k4
Copy link
Copy Markdown
Contributor

@3v0k4 3v0k4 commented Nov 14, 2023

This PR introduces an RSpec formatter to track execution_times for both Queue Mode and Regular Mode: ticket.

As a result, the long-standing issues we have been fighting with are gone. Also, we now can record test outcomes (not only times) and generalize this pattern to all the test runners, effectively allowing Knapsack Pro to work with any language/test runner.


A quick way to test locally with rails-app-with-knapsack_pro:

  • print comparison of times, but use old time tracker to send times to the API (old vs new tracker): VERBOSE=1 bin/knapsack_pro_queue_rspec 0 2 2023-11-08-01
  • use the new time tracker to send times to API (and print comparison): VERBOSE=1 NEW_TIME_TRACKER=1 bin/knapsack_pro_queue_rspec 0 2 2023-11-08-01

Also, I run a build on CircleCI with:

export VERBOSE=1

Details

https://app.circleci.com/pipelines/github/KnapsackPro/knapsack-pro-api/6050/workflows/bd5166e6-971b-4f7e-9a54-7e56495268ed/jobs/8864

https://knapsackpro.com/dashboard/organizations/54/projects/730/test_suites/3201/builds/35c9d4d3-9552-4a9e-b659-0d21c4d73d7a

build_ids = ["35c9d4d3-9552-4a9e-b659-0d21c4d73d7a", "a0c32cea-52ef-4e63-b719-d683d0c6fcb7"]
test_file_paths = build_ids.map do |build_id|
build_distribution_repository = BuildDistributionRepository.new
build_distribution_entity = build_distribution_repository.last_for_build_id(build_id)
build_distribution = BuildDistributionDecorator.new(build_distribution_entity)
test_suite = TestSuite.find(3201)
test_files = Views::BuildPageTestFiles.new(test_suite, build_distribution)
# test_files.size
test_files.to_a.map(&:path)
end

new, old = test_file_paths
new.size
=> 632

old.size
=> 650

new - old
=> ["spec/features/dashboard/main_spec.rb"]


old - new
["spec/features/dashboard/main_spec.rb[1:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:5:1]",
 "spec/features/dashboard/main_spec.rb[1:1:6:2:1]",
 "spec/features/dashboard/main_spec.rb[1:1:4:1]",
 "spec/features/dashboard/main_spec.rb[1:1:8:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:2:1:2:1]",
 "spec/features/dashboard/main_spec.rb[1:2:1]",
 "spec/features/dashboard/main_spec.rb[1:1:9:1:2]",
 "spec/features/dashboard/main_spec.rb[1:1:7:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:6:3:1]",
 "spec/features/dashboard/main_spec.rb[1:1:9:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:7:2:1]",
 "spec/features/dashboard/main_spec.rb[1:1:2:1:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:6:1]",
 "spec/features/dashboard/main_spec.rb[1:1:3:1]",
 "spec/features/dashboard/main_spec.rb[1:1:9:2:2]",
 "spec/features/dashboard/main_spec.rb[1:1:8:2:1]",
 "spec/features/dashboard/main_spec.rb[1:3:1]",
 "spec/features/dashboard/main_spec.rb[1:1:9:2:1]"]

node 0

Path OldTim NewTim Diff F
spec/controllers/autologin_controller_spec.rb +0.606 +0.283 +0.323 ⚠️
spec/features/dashboard/billing/subscription_error +15.800 +15.800 +0.000
spec/features/dashboard/builds/build_distribution_ +1.251 +1.252 -0.001
spec/features/dashboard/builds/build_distribution_ +1.542 +1.269 +0.273 ⚠️
spec/features/dashboard/builds/build_distribution_ +1.392 +1.393 -0.001
spec/features/dashboard/builds/build_distribution_ +1.740 +1.462 +0.278 ⚠️
spec/features/dashboard/builds/builds_for_test_sui +7.142 +6.881 +0.261 ⚠️
spec/mailers/gdpr/user_mailer_spec.rb +0.151 +0.149 +0.002
spec/requests/api/v1/build_subsets_spec.rb +3.582 +3.322 +0.260 ⚠️
spec/services/autologin/token_validator_spec.rb +0.206 +0.203 +0.003
spec/services/commit_authors_analyzer_spec.rb +0.327 +0.325 +0.002
spec/services/test_suite_client_version_checker_sp +0.180 +0.176 +0.004
spec/services/test_suite_onboarding/steps/default_ +0.265 +0.262 +0.003
spec/workers/billing/create_braintree_customer_pro +0.077 +0.076 +0.001
spec/workers/billing/notify_users_about_past_due_s +0.232 +0.230 +0.002
spec/workers/test_suite_metric_worker_spec.rb +0.390 +0.388 +0.002
spec/workers/track_build_author_worker_spec.rb +0.160 +0.158 +0.002

node 1

Path OldTim NewTim Diff F
spec/controllers/api/v1/build_subsets_controller_s +0.376 +0.372 +0.004
spec/domain/project_domain/cache_build_distributio +0.105 +0.103 +0.002
spec/features/dashboard/billing/subscription_error +13.118 +13.118 +0.000
spec/features/dashboard/builds/test_files_history_ +2.337 +2.066 +0.271 ⚠️
spec/mailers/notify_mailer_spec.rb[1:10:12:1] +0.063 +0.064 -0.001
spec/mailers/notify_mailer_spec.rb[1:10:5:1] +0.068 +0.069 -0.001
spec/mailers/notify_mailer_spec.rb[1:10:7:1] +0.052 +0.053 -0.001
spec/mailers/notify_mailer_spec.rb[1:5:1:1] +0.117 +0.118 -0.001
spec/mailers/notify_mailer_spec.rb[1:5:5:13:1] +0.099 +0.100 -0.001
spec/mailers/notify_mailer_spec.rb[1:5:5:16:1] +0.105 +0.106 -0.001
spec/mailers/notify_mailer_spec.rb[1:5:5:8:1] +0.108 +0.110 -0.002
spec/mailers/notify_mailer_spec.rb[1:6:3:1:1] +0.070 +0.071 -0.001
spec/mailers/notify_mailer_spec.rb[1:6:3:7:1] +0.070 +0.070 +0.000
spec/mailers/notify_mailer_spec.rb[1:8:1:1] +0.093 +0.094 -0.001
spec/mailers/notify_mailer_spec.rb[1:8:3:11:1] +0.078 +0.080 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:3:13:1] +0.075 +0.076 -0.001
spec/mailers/notify_mailer_spec.rb[1:8:4:12:1] +0.710 +0.103 +0.607 ⚠️
spec/mailers/notify_mailer_spec.rb[1:9:2:1] +0.074 +0.075 -0.001
spec/mailers/notify_mailer_spec.rb[1:9:4:11:1] +0.091 +0.093 -0.002
spec/mailers/notify_mailer_spec.rb[1:9:4:9:1] +0.077 +0.079 -0.002
spec/mailers/notify_mailer_spec.rb[1:9:6:1] +0.095 +0.096 -0.001
spec/mailers/notify_mailer_spec.rb[1:9:8:1] +0.109 +0.111 -0.002
spec/models/organization_spec.rb +1.411 +1.395 +0.016 ⚠️
spec/services/billing/payment_method_spec.rb +0.101 +0.100 +0.001
spec/services/gdpr/organization_decorator_spec.rb +0.591 +0.581 +0.010 ⚠️
spec/services/heroku/api/teams_spec.rb +0.857 +0.569 +0.288 ⚠️
spec/services/test_suite_content/build_distributio +0.136 +0.134 +0.002
spec/services/unique_user_seat_detector_spec.rb +0.117 +0.115 +0.002
spec/workers/remove_project_worker_spec.rb +0.101 +0.100 +0.001
spec/workers/track_test_suite_client_worker_spec.r +0.288 +0.285 +0.003

node 2

Path OldTim NewTim Diff F
spec/channels/test_channel_spec.rb +0.000 +0.000 +0.000
spec/controllers/api/v1/queues_controller_spec.rb +0.708 +0.415 +0.293 ⚠️
spec/domain/project_domain/build/build_param_spec. +0.454 +0.045 +0.409 ⚠️
spec/features/autologin_token_spec.rb +0.522 +0.521 +0.001
spec/features/ci_comparisons_spec.rb +5.898 +5.640 +0.258 ⚠️
spec/features/dashboard/billing/subscription_error +2.457 +2.457 +0.000
spec/features/dashboard/billing/subscription_happy +37.084 +37.084 +0.000
spec/features/dashboard/builds/build_distribution_ +1.173 +1.173 +0.000
spec/features/dashboard/builds/test_files_history_ +0.582 +0.582 +0.000
spec/features/missing_organization_spec.rb +2.616 +2.364 +0.252 ⚠️
spec/lib/ext/base_validator_spec.rb +0.035 +0.034 +0.001
spec/lib/ext/params_filter_spec.rb +0.046 +0.045 +0.001
spec/mailers/notify_mailer_spec.rb[1:10:13:1] +0.037 +0.039 -0.002
spec/mailers/notify_mailer_spec.rb[1:10:14:1:1] +0.040 +0.042 -0.002
spec/mailers/notify_mailer_spec.rb[1:10:8:1] +0.037 +0.039 -0.002
spec/mailers/notify_mailer_spec.rb[1:11:11:1] +0.036 +0.037 -0.001
spec/mailers/notify_mailer_spec.rb[1:11:2:1] +0.036 +0.038 -0.002
spec/mailers/notify_mailer_spec.rb[1:11:5:1] +0.036 +0.038 -0.002
spec/mailers/notify_mailer_spec.rb[1:11:6:1] +0.041 +0.042 -0.001
spec/mailers/notify_mailer_spec.rb[1:11:9:1] +0.037 +0.038 -0.001
spec/mailers/notify_mailer_spec.rb[1:12:4] +0.058 +0.057 +0.001
spec/mailers/notify_mailer_spec.rb[1:6:3:4:1] +0.047 +0.047 +0.000
spec/mailers/notify_mailer_spec.rb[1:6:3:9:1] +0.046 +0.047 -0.001
spec/mailers/notify_mailer_spec.rb[1:7:3:10:1] +0.045 +0.047 -0.002
spec/mailers/notify_mailer_spec.rb[1:7:3:11:1] +0.045 +0.047 -0.002
spec/mailers/notify_mailer_spec.rb[1:7:3:6:1] +0.045 +0.047 -0.002
spec/mailers/notify_mailer_spec.rb[1:7:3:8:1] +0.045 +0.047 -0.002
spec/mailers/notify_mailer_spec.rb[1:7:3:9:1] +0.044 +0.046 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:10:1:1] +0.064 +0.065 -0.001
spec/mailers/notify_mailer_spec.rb[1:8:4:13:1] +0.064 +0.066 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:4:14:1] +0.062 +0.064 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:7:1] +0.061 +0.062 -0.001
spec/mailers/notify_mailer_spec.rb[1:8:8:1] +0.081 +0.082 -0.001
spec/mailers/notify_mailer_spec.rb[1:9:4:15:1] +0.168 +0.160 +0.008
spec/requests/saml_spec.rb +1.345 +1.072 +0.273 ⚠️
spec/services/build_heartbeat_updator_spec.rb +0.033 +0.032 +0.001
spec/services/send_grid_api/contact_spec.rb +0.055 +0.054 +0.001
spec/services/test_suite_onboarding/step_detector_ +0.040 +0.040 +0.000
spec/services/testing_frameworks_comparer_spec.rb +0.731 +0.723 +0.008
spec/workers/gdpr/inactive_user_redaction_worker_s +0.061 +0.060 +0.001
spec/workers/test_suite_content/update_test_files_ +0.048 +0.048 +0.000

node 3

Path OldTim NewTim Diff F
spec/domain/knapsack_domain/queue/queue_distributo +1.169 +1.152 +0.017 ⚠️
spec/domain/project_domain/build/build_repository_ +1.553 +1.091 +0.462 ⚠️
spec/features/dashboard/admin_statistics_spec.rb +18.048 +18.042 +0.006
spec/features/dashboard/test_suites_spec.rb +10.081 +9.810 +0.271 ⚠️
spec/features/homepage_calculator_spec.rb +3.215 +2.944 +0.271 ⚠️
spec/features/public_test_suites_spec.rb +2.019 +1.759 +0.260 ⚠️
spec/mailers/autologin_mailer_spec.rb +0.212 +0.211 +0.001
spec/mailers/notify_mailer_spec.rb[1:8:3:5:1] +0.113 +0.111 +0.002
spec/models/sem_tracking_spec.rb +0.339 +0.336 +0.003
spec/services/ci_comparer_spec.rb +0.296 +0.292 +0.004
spec/services/gdpr/model_decorator_spec.rb +0.316 +0.311 +0.005
spec/services/heroku/user_creator_spec.rb +2.440 +2.429 +0.011 ⚠️
spec/services/saml/user_provisioner_spec.rb +0.849 +0.254 +0.595 ⚠️
spec/workers/heroku_worker/onboarding_worker_spec. +0.351 +0.349 +0.002
spec/workers/test_suite_onboarding/step_detector_w +0.302 +0.299 +0.003

node 4

Path OldTim NewTim Diff F
spec/domain/organization_domain/organization/organ +0.068 +0.066 +0.002
spec/features/dashboard/billing/subscription_error +2.747 +2.472 +0.275 ⚠️
spec/features/dashboard/billing/subscription_happy +20.304 +20.304 +0.000
spec/features/dashboard/builds/build_distribution_ +1.262 +1.262 +0.000
spec/features/faq_spec.rb +8.962 +8.690 +0.272 ⚠️
spec/form_objects/onboarding/project_form_spec.rb +0.301 +0.298 +0.003
spec/mailers/notify_mailer_spec.rb[1:10:1:1] +0.052 +0.052 +0.000
spec/mailers/notify_mailer_spec.rb[1:10:4:1] +0.047 +0.049 -0.002
spec/mailers/notify_mailer_spec.rb[1:5:2:1] +0.170 +0.173 -0.003
spec/mailers/notify_mailer_spec.rb[1:5:5:4:1] +0.083 +0.086 -0.003
spec/mailers/notify_mailer_spec.rb[1:5:5:7:1] +0.089 +0.091 -0.002
spec/mailers/notify_mailer_spec.rb[1:5:6:11:1] +0.128 +0.131 -0.003
spec/mailers/notify_mailer_spec.rb[1:5:6:1:1] +0.229 +0.232 -0.003
spec/mailers/notify_mailer_spec.rb[1:5:6:4:1] +0.209 +0.212 -0.003
spec/mailers/notify_mailer_spec.rb[1:6:3:14:1] +0.054 +0.056 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:3:10:1] +0.069 +0.072 -0.003
spec/mailers/notify_mailer_spec.rb[1:8:3:12:1] +0.240 +0.242 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:3:14:1] +0.074 +0.077 -0.003
spec/mailers/notify_mailer_spec.rb[1:8:3:3:1] +0.072 +0.075 -0.003
spec/mailers/notify_mailer_spec.rb[1:8:3:6:1] +0.075 +0.077 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:3:7:1] +0.072 +0.075 -0.003
spec/mailers/notify_mailer_spec.rb[1:8:4:2:1] +0.075 +0.077 -0.002
spec/mailers/notify_mailer_spec.rb[1:9:3:11:1] +0.068 +0.070 -0.002
spec/mailers/notify_mailer_spec.rb[1:9:3:16:1] +0.071 +0.074 -0.003
spec/mailers/notify_mailer_spec.rb[1:9:7:1] +0.070 +0.072 -0.002
spec/mailers/notify_mailer_spec.rb[1:9:9:1:1] +0.062 +0.065 -0.003
spec/mailers/one_off_mailer_spec.rb +0.425 +0.422 +0.003
spec/models/heroku_addon_token_spec.rb +0.043 +0.043 +0.000
spec/models/test_suite_archive_spec.rb +0.064 +0.063 +0.001
spec/models/test_suite_spec.rb +1.115 +0.814 +0.301 ⚠️
spec/services/heroku/addon_provisioner_spec.rb +0.581 +0.267 +0.314 ⚠️
spec/services/pricing_analyzer_spec.rb +2.776 +2.757 +0.019 ⚠️
spec/services/send_grid_api/global_unsubscribes_re +0.044 +0.043 +0.001
spec/services/test_suite_content/archive_manager_s +0.504 +0.087 +0.417 ⚠️
spec/services/test_suite_content/build_subset_list +0.071 +0.070 +0.001
spec/workers/hubspot_worker/deal_creator_spec.rb +0.292 +0.291 +0.001
spec/workers/hubspot_worker/heroku_addon_deal_crea +0.390 +0.389 +0.001

node 5

Path OldTim NewTim Diff F
spec/domain/knapsack_domain/queue/queued_test_file +0.112 +0.110 +0.002
spec/domain/project_domain/build/build_entity_spec +0.166 +0.163 +0.003
spec/domain/project_domain/build_subset/build_subs +0.863 +0.861 +0.002
spec/domain/project_domain/test_file/test_file_val +0.127 +0.124 +0.003
spec/features/admin/build_details_spec.rb +2.409 +2.409 +0.000
spec/features/dashboard/billing/invoice_payment_sp +5.498 +5.231 +0.267 ⚠️
spec/features/dashboard/builds/build_distribution_ +1.076 +1.075 +0.001
spec/features/homepage_signup_spec.rb +16.403 +16.401 +0.002
spec/features/testimonials_spec.rb +2.705 +2.442 +0.263 ⚠️
spec/mailers/notify_mailer_spec.rb[1:10:6:1] +0.631 +0.067 +0.564 ⚠️
spec/mailers/notify_mailer_spec.rb[1:7:1:1] +0.049 +0.050 -0.001
spec/mailers/notify_mailer_spec.rb[1:8:3:17:1] +0.077 +0.078 -0.001
spec/mailers/notify_mailer_spec.rb[1:8:4:11:1] +0.086 +0.086 +0.000
spec/mailers/notify_mailer_spec.rb[1:9:4:12:1] +0.093 +0.092 +0.001
spec/services/heroku/shared_access_checker_spec.rb +0.107 +0.106 +0.001
spec/services/hubspot_crm/api/engagement_note_spec +0.112 +0.111 +0.001
spec/services/infakt/reports/transaction_finder_sp +0.184 +0.179 +0.005
spec/services/organization_trait_determiner_spec.r +0.798 +0.497 +0.301 ⚠️
spec/services/test_suite_onboarding/steps/did_requ +0.091 +0.090 +0.001
spec/workers/gdpr/notify_organization_approaching_ +0.164 +0.162 +0.002
spec/workers/queue_cache_ci_node_worker_spec.rb +0.094 +0.093 +0.001
spec/workers/remove_test_suite_worker_spec.rb +0.130 +0.130 +0.000

node 6

Path OldTim NewTim Diff F
spec/controllers/webooks/braintree_controller_spec +0.723 +0.168 +0.555 ⚠️
spec/domain/knapsack_domain/build_distribution/new +0.012 +0.012 +0.000
spec/domain/knapsack_domain/queue/queue_manager_sp +0.180 +0.177 +0.003
spec/domain/project_domain/build/build_analyzer_sp +0.438 +0.434 +0.004
spec/features/dashboard/billing/subscription_error +8.471 +8.204 +0.267 ⚠️
spec/features/dashboard/billing/subscription_happy +17.363 +17.363 +0.000
spec/features/dashboard/consent_profile_spec.rb +4.308 +4.038 +0.270 ⚠️
spec/features/privacy_policy_spec.rb +0.200 +0.200 +0.000
spec/form_objects/test_suite_form_spec.rb +0.129 +0.128 +0.001
spec/mailers/notify_mailer_spec.rb[1:12:1] +0.016 +0.021 -0.005
spec/mailers/notify_mailer_spec.rb[1:12:2] +0.018 +0.024 -0.006
spec/mailers/notify_mailer_spec.rb[1:2:2:1:3:1] +0.020 +0.025 -0.005
spec/mailers/notify_mailer_spec.rb[1:2:2:2:1] +0.436 +0.029 +0.407 ⚠️
spec/mailers/notify_mailer_spec.rb[1:2:3:3:1] +0.025 +0.030 -0.005
spec/mailers/notify_mailer_spec.rb[1:4:7:3:1] +0.021 +0.022 -0.001
spec/mailers/notify_mailer_spec.rb[1:4:7:4:4:1] +0.018 +0.023 -0.005
spec/mailers/notify_mailer_spec.rb[1:4:7:4:5:1] +0.019 +0.024 -0.005
spec/mailers/notify_mailer_spec.rb[1:8:5:1] +0.075 +0.076 -0.001
spec/mailers/notify_mailer_spec.rb[1:9:3:14:1] +0.066 +0.068 -0.002
spec/models/build_distribution_metric_spec.rb +0.014 +0.014 +0.000
spec/models/queue_metric_spec.rb +0.014 +0.014 +0.000
spec/models/test_suite_metric_spec.rb +0.014 +0.014 +0.000
spec/requests/api/v1/queues_spec.rb +3.495 +3.481 +0.014 ⚠️
spec/requests/heroku/sso_spec.rb +0.941 +0.656 +0.285 ⚠️
spec/services/api_metric_counter_spec.rb +0.012 +0.012 +0.000
spec/services/billing/error_explainer_spec.rb +0.047 +0.046 +0.001
spec/services/duplicated_test_files_for_build_subs +0.012 +0.012 +0.000
spec/services/gdpr/email_deleter_spec.rb +0.013 +0.013 +0.000
spec/services/profit_well/customer_traits_spec.rb +0.019 +0.019 +0.000
spec/services/saml/utils_spec.rb +0.012 +0.012 +0.000
spec/workers/api_usage_worker_spec.rb +0.144 +0.143 +0.001
spec/workers/billing/notify_admin_about_past_due_s +0.083 +0.082 +0.001
spec/workers/gdpr/inactive_organization_redaction_ +0.134 +0.132 +0.002
spec/workers/remove_old_builds_worker_spec.rb +0.136 +0.134 +0.002
spec/workers/test_suite_content/update_test_files_ +0.012 +0.012 +0.000
spec/workers/test_suite_content/update_test_files_ +0.012 +0.012 +0.000
spec/workers/test_suite_content/update_test_files_ +0.017 +0.017 +0.000
spec/workers/test_suite_onboarding/rspec_split_by_ +0.510 +0.506 +0.004

node 7

Path OldTim NewTim Diff F
spec/features/dashboard/builds/test_files_history_ +0.904 +0.905 -0.001
spec/features/dashboard/builds/test_files_history_ +0.913 +0.912 +0.001
spec/features/dashboard/team_members_spec.rb +13.391 +13.388 +0.003
spec/mailers/heroku_mailer_spec.rb +0.176 +0.173 +0.003
spec/mailers/notify_mailer_spec.rb[1:1:7:1] +0.036 +0.036 +0.000
spec/mailers/notify_mailer_spec.rb[1:5:5:10:1] +0.101 +0.101 +0.000
spec/mailers/notify_mailer_spec.rb[1:5:5:12:1] +0.101 +0.103 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:3:9:1] +0.118 +0.119 -0.001
spec/mailers/notify_mailer_spec.rb[1:8:4:7:1] +0.085 +0.087 -0.002
spec/mailers/notify_mailer_spec.rb[1:9:3:12:1] +0.103 +0.105 -0.002
spec/mailers/notify_mailer_spec.rb[1:9:3:4:1] +0.133 +0.131 +0.002
spec/mailers/notify_mailer_spec.rb[1:9:3:5:1] +0.105 +0.107 -0.002
spec/models/heroku_addon_event_spec.rb +0.777 +0.114 +0.663 ⚠️
spec/models/homepage_signup_spec.rb +0.141 +0.139 +0.002
spec/models/invoice_spec.rb +0.159 +0.156 +0.003
spec/models/user_seat_metric_spec.rb +0.180 +0.178 +0.002
spec/services/gdpr/organization_redactor_spec.rb +0.980 +0.706 +0.274 ⚠️
spec/services/saml/certificate_presenter_spec.rb +0.154 +0.150 +0.004
spec/services/test_suite_onboarding/steps/not_all_ +0.206 +0.203 +0.003
spec/services/test_suite_onboarding/steps/recorded +0.152 +0.150 +0.002

node 8

Path OldTim NewTim Diff F
spec/controllers/api/v1/builds_controller_spec.rb +2.567 +2.552 +0.015 ⚠️
spec/features/dashboard/builds/build_distribution_ +4.533 +4.241 +0.292 ⚠️
spec/workers/billing/create_monthly_subscription_i +9.109 +9.106 +0.003

node 9

Path OldTim NewTim Diff F
spec/domain/project_domain/build/build_validator_s +0.980 +0.513 +0.467 ⚠️
spec/domain/project_domain/build_subset/build_subs +0.144 +0.142 +0.002
spec/features/dashboard/builds/test_files_history_ +2.177 +2.177 +0.000
spec/features/dashboard/projects_spec.rb +18.034 +18.030 +0.004
spec/mailers/notify_mailer_spec.rb[1:8:3:2:1] +0.189 +0.188 +0.001
spec/services/gdpr/organization_repository_spec.rb +0.332 +0.329 +0.003
spec/services/saml/identity_provider_decorator_spe +0.292 +0.289 +0.003
spec/services/saml/settings_builder_spec.rb +0.252 +0.249 +0.003
spec/services/test_suite_content/archived_test_fil +2.683 +2.409 +0.274 ⚠️
spec/services/test_suite_onboarding/rspec_split_by +0.188 +0.186 +0.002
spec/workers/track_commit_authors_worker_spec.rb +0.272 +0.269 +0.003

node 10

Path OldTim NewTim Diff F
spec/controllers/home_controller_spec.rb +0.082 +0.082 +0.000
spec/domain/organization_domain/organization/organ +0.080 +0.080 +0.000
spec/domain/project_domain/node/node_collection_sp +0.067 +0.066 +0.001
spec/domain/project_domain/project/project_entity_ +0.085 +0.084 +0.001
spec/features/affiliate_spec.rb +0.823 +0.823 +0.000
spec/features/dashboard/builds/build_distribution_ +1.782 +1.782 +0.000
spec/features/dashboard/builds/test_files_history_ +16.888 +16.888 +0.000
spec/features/features_spec.rb +2.451 +2.167 +0.284 ⚠️
spec/mailers/notify_mailer_spec.rb[1:10:10:1] +0.071 +0.073 -0.002
spec/mailers/notify_mailer_spec.rb[1:10:14:3:1] +0.067 +0.066 +0.001
spec/mailers/notify_mailer_spec.rb[1:10:14:4:1] +0.077 +0.079 -0.002
spec/mailers/notify_mailer_spec.rb[1:11:14:1] +0.082 +0.083 -0.001
spec/mailers/notify_mailer_spec.rb[1:11:16:1:1] +0.061 +0.063 -0.002
spec/mailers/notify_mailer_spec.rb[1:11:16:3:1] +0.104 +0.103 +0.001
spec/mailers/notify_mailer_spec.rb[1:11:19:1:1] +0.093 +0.093 +0.000
spec/mailers/notify_mailer_spec.rb[1:6:3:13:1] +0.059 +0.061 -0.002
spec/mailers/notify_mailer_spec.rb[1:7:3:17:1] +0.105 +0.106 -0.001
spec/mailers/notify_mailer_spec.rb[1:8:4:1:1] +0.137 +0.139 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:4:3:1] +0.092 +0.094 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:4:9:1] +0.094 +0.095 -0.001
spec/mailers/notify_mailer_spec.rb[1:8:9:1:1] +0.099 +0.100 -0.001
spec/mailers/notify_mailer_spec.rb[1:9:1:1] +0.168 +0.169 -0.001
spec/mailers/notify_mailer_spec.rb[1:9:3:13:1] +0.141 +0.143 -0.002
spec/mailers/notify_mailer_spec.rb[1:9:3:15:1] +0.134 +0.135 -0.001
spec/mailers/notify_mailer_spec.rb[1:9:3:6:1] +0.192 +0.194 -0.002
spec/models/organization_action_spec.rb +0.102 +0.101 +0.001
spec/services/heroku/consent_profile_approver_spec +0.094 +0.093 +0.001
spec/services/homepage_signup_creator_spec.rb +0.979 +0.971 +0.008
spec/services/hubspot_crm/api/company_spec.rb +0.098 +0.097 +0.001
spec/services/missing_build_subset_spec.rb +0.080 +0.079 +0.001
spec/services/send_grid_api/global_unsubscribes_re +0.061 +0.061 +0.000
spec/services/text_encryptor_spec.rb +1.231 +0.943 +0.288 ⚠️
spec/workers/build_analytics_worker_spec.rb +0.781 +0.143 +0.638 ⚠️
spec/workers/build_distributor_worker_spec.rb +0.132 +0.130 +0.002
spec/workers/remove_old_test_suite_archives_worker +0.068 +0.068 +0.000

node 11

Path OldTim NewTim Diff F
spec/features/dashboard/onboarding_spec.rb +13.317 +13.314 +0.003
spec/workers/trial_period_worker_spec.rb +29.606 +29.333 +0.273 ⚠️

node 12

Path OldTim NewTim Diff F
spec/features/admin/admin_panel_spec.rb +0.743 +0.742 +0.001
spec/lib/dry_validations/node_dry_validation_spec. +0.115 +0.112 +0.003
spec/lib/ext/composite_validator_spec.rb +0.100 +0.098 +0.002
spec/mailers/notify_mailer_spec.rb[1:5:5:11:1] +0.087 +0.089 -0.002
spec/mailers/notify_mailer_spec.rb[1:5:5:3:1] +0.094 +0.095 -0.001
spec/mailers/notify_mailer_spec.rb[1:5:5:6:1] +0.084 +0.085 -0.001
spec/mailers/notify_mailer_spec.rb[1:5:6:8:1] +0.094 +0.095 -0.001
spec/mailers/notify_mailer_spec.rb[1:6:3:16:1] +0.063 +0.063 +0.000
spec/mailers/notify_mailer_spec.rb[1:8:4:5:1] +0.122 +0.120 +0.002
spec/mailers/notify_mailer_spec.rb[1:9:10:1:1] +0.076 +0.078 -0.002
spec/mailers/notify_mailer_spec.rb[1:9:12:1:1] +0.085 +0.084 +0.001
spec/mailers/notify_mailer_spec.rb[1:9:4:14:1] +0.088 +0.088 +0.000
spec/mailers/notify_mailer_spec.rb[1:9:5:1] +0.075 +0.076 -0.001
spec/models/project_spec.rb +0.107 +0.106 +0.001
spec/requests/api/v1/build_distributions_spec.rb +4.505 +4.478 +0.027 ⚠️
spec/requests/dashboard/onboarding_spec.rb +0.114 +0.114 +0.000
spec/services/cache_item_manager_spec.rb +0.696 +0.093 +0.603 ⚠️
spec/services/heroku/event_creator_spec.rb +0.092 +0.091 +0.001
spec/services/infakt/reports/invoice_settlement_gr +1.344 +1.031 +0.313 ⚠️
spec/services/queue_mode_build_time_savings_calcul +0.071 +0.069 +0.002
spec/services/test_suite_content/recently_executed +0.076 +0.075 +0.001
spec/workers/login_request_worker_spec.rb +0.086 +0.085 +0.001
spec/workers/remove_old_queue_cache_ci_nodes_worke +0.077 +0.076 +0.001
spec/workers/set_organization_plan_worker_spec.rb +1.128 +1.123 +0.005

node 13

Path OldTim NewTim Diff F
spec/domain/project_domain/build_subset/build_subs +0.731 +0.165 +0.566 ⚠️
spec/features/dashboard/billing/subscription_happy +2.601 +2.333 +0.268 ⚠️
spec/features/dashboard/billing/subscription_happy +24.841 +24.841 +0.000
spec/features/dashboard/builds/build_distribution_ +1.158 +1.159 -0.001
spec/features/integrations_spec.rb +6.688 +6.425 +0.263 ⚠️
spec/features/pricing_spec.rb +2.849 +2.847 +0.002
spec/mailers/customer_mailer_spec.rb +1.436 +1.137 +0.299 ⚠️
spec/mailers/notify_mailer_spec.rb[1:5:6:13:1] +0.090 +0.092 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:4:6:1] +0.081 +0.083 -0.002
spec/mailers/notify_mailer_spec.rb[1:9:3:10:1] +0.078 +0.080 -0.002
spec/mailers/notify_mailer_spec.rb[1:9:4:8:1] +0.120 +0.119 +0.001
spec/models/consent_profile_spec.rb +0.148 +0.145 +0.003
spec/models/test_suite_client_spec.rb +0.144 +0.141 +0.003
spec/requests/dashboard/main_spec.rb +0.160 +0.160 +0.000
spec/services/test_suite_content/test_files_histor +0.124 +0.123 +0.001
spec/workers/billing/invoice_paid_worker_spec.rb +0.174 +0.172 +0.002
spec/workers/hubspot_worker/contact_upserter_spec. +0.165 +0.164 +0.001
spec/workers/queue_metric_worker_spec.rb +0.129 +0.127 +0.002
spec/workers/remove_commit_authors_worker_spec.rb +0.067 +0.066 +0.001

node 14

Path OldTim NewTim Diff F
spec/features/dashboard/billing/subscription_error +4.579 +4.319 +0.260 ⚠️
spec/features/dashboard/billing/subscription_error +15.871 +15.872 -0.001
spec/features/dashboard/builds/build_distribution_ +3.206 +3.206 +0.000
spec/models/heroku_addon_spec.rb +0.746 +0.725 +0.021 ⚠️
spec/services/faq_finder_spec.rb +1.080 +0.767 +0.313 ⚠️
spec/services/gdpr/user_decorator_spec.rb +0.753 +0.747 +0.006
spec/services/heroku/api/apps_spec.rb +1.179 +1.178 +0.001
spec/services/integration_page_spec.rb +0.439 +0.436 +0.003
spec/services/test_suite_onboarding/steps/merged_t +1.064 +0.803 +0.261 ⚠️
spec/services/test_suite_onboarding/steps/recorded +0.324 +0.321 +0.003
spec/services/user_seat_analyzer_spec.rb +2.826 +2.556 +0.270 ⚠️

node 15

Path OldTim NewTim Diff F
spec/domain/knapsack_domain/build_distribution/bui +0.032 +0.031 +0.001
spec/domain/knapsack_domain/build_distribution/bui +0.036 +0.035 +0.001
spec/domain/knapsack_domain/build_distributor/buil +0.037 +0.037 +0.000
spec/domain/knapsack_domain/knapsack_least_time/bu +0.052 +0.051 +0.001
spec/domain/project_domain/build/build_factory_spe +0.044 +0.044 +0.000
spec/domain/project_domain/build_distribution/buil +0.772 +0.450 +0.322 ⚠️
spec/domain/project_domain/build_subset/build_subs +0.493 +0.523 -0.030 ⚠️
spec/features/dashboard/billing/subscription_error +17.839 +17.839 +0.000
spec/features/dashboard/billing/subscription_error +2.538 +2.272 +0.266 ⚠️
spec/features/dashboard/builds/build_distribution_ +1.153 +1.154 -0.001
spec/features/dashboard/builds/build_distribution_ +1.518 +1.242 +0.276 ⚠️
spec/features/sidekiq_web_ui_spec.rb +0.414 +0.414 +0.000
spec/features/testing_frameworks_spec.rb +7.095 +6.820 +0.275 ⚠️
spec/mailers/gdpr/admin_mailer_spec.rb +1.697 +1.688 +0.009
spec/mailers/notify_mailer_spec.rb[1:12:6] +0.021 +0.021 +0.000
spec/mailers/notify_mailer_spec.rb[1:1:11:1] +0.033 +0.032 +0.001
spec/mailers/notify_mailer_spec.rb[1:1:5:1] +0.040 +0.037 +0.003
spec/mailers/notify_mailer_spec.rb[1:1:6:1] +0.027 +0.028 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:1:1:1:1] +0.025 +0.026 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:1:1:4:1] +0.023 +0.024 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:1:2:1] +0.049 +0.053 -0.004
spec/mailers/notify_mailer_spec.rb[1:2:1:4:1] +0.077 +0.071 +0.006
spec/mailers/notify_mailer_spec.rb[1:2:1:5:1] +0.024 +0.025 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:1:6:1] +0.127 +0.126 +0.001
spec/mailers/notify_mailer_spec.rb[1:2:2:1:1:1] +0.021 +0.022 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:2:1:2:1] +0.021 +0.022 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:2:1:4:1] +0.021 +0.022 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:2:5:1] +0.021 +0.022 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:3:1:1:1] +0.025 +0.026 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:3:1:2:1] +0.024 +0.025 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:3:1:3:1] +0.023 +0.024 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:3:1:4:1] +0.025 +0.026 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:3:2:1] +0.025 +0.026 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:3:4:1] +0.025 +0.025 +0.000
spec/mailers/notify_mailer_spec.rb[1:2:3:5:1] +0.033 +0.034 -0.001
spec/mailers/notify_mailer_spec.rb[1:3:1:1] +0.019 +0.020 -0.001
spec/mailers/notify_mailer_spec.rb[1:3:2:1] +0.019 +0.020 -0.001
spec/mailers/notify_mailer_spec.rb[1:3:3:1] +0.021 +0.022 -0.001
spec/mailers/notify_mailer_spec.rb[1:3:4:1] +0.023 +0.021 +0.002
spec/mailers/notify_mailer_spec.rb[1:4:1:1] +0.023 +0.024 -0.001
spec/mailers/notify_mailer_spec.rb[1:4:2:1] +0.026 +0.026 +0.000
spec/mailers/notify_mailer_spec.rb[1:4:3:1] +0.026 +0.027 -0.001
spec/mailers/notify_mailer_spec.rb[1:4:4:1] +0.026 +0.027 -0.001
spec/mailers/notify_mailer_spec.rb[1:4:5:1] +0.025 +0.026 -0.001
spec/mailers/notify_mailer_spec.rb[1:4:6:1:1] +0.027 +0.027 +0.000
spec/mailers/notify_mailer_spec.rb[1:4:6:2:1] +0.028 +0.029 -0.001
spec/mailers/notify_mailer_spec.rb[1:4:7:1:1] +0.020 +0.021 -0.001
spec/mailers/notify_mailer_spec.rb[1:4:7:2:1] +0.021 +0.021 +0.000
spec/mailers/notify_mailer_spec.rb[1:4:7:4:1:1] +0.024 +0.024 +0.000
spec/mailers/notify_mailer_spec.rb[1:4:7:4:2:1] +0.025 +0.026 -0.001
spec/mailers/notify_mailer_spec.rb[1:4:7:4:3:1] +0.025 +0.025 +0.000
spec/mailers/notify_mailer_spec.rb[1:4:7:4:6:1] +0.023 +0.023 +0.000
spec/mailers/notify_mailer_spec.rb[1:4:7:4:7:1] +0.026 +0.027 -0.001
spec/mailers/notify_mailer_spec.rb[1:4:7:4:8:1] +0.025 +0.026 -0.001
spec/models/identity_provider_spec.rb +0.062 +0.061 +0.001
spec/models/user_spec.rb +0.552 +0.542 +0.010 ⚠️
spec/queries/test_suite_client_query_spec.rb +0.030 +0.030 +0.000
spec/requests/pricing_spec.rb +0.030 +0.030 +0.000
spec/requests/terms_spec.rb +0.029 +0.029 +0.000
spec/requests/www_redirect_spec.rb +0.026 +0.026 +0.000
spec/services/build_distribution_metric_counter_sp +0.030 +0.030 +0.000
spec/services/heroku/addon_collaborator_spec.rb +0.038 +0.038 +0.000
spec/services/infakt/client_spec.rb +0.037 +0.037 +0.000
spec/services/infakt/reports/invoice_searcher_spec +0.036 +0.036 +0.000
spec/services/mail_chimp_api/onboarding_list_spec. +0.548 +0.048 +0.500 ⚠️
spec/services/queue_metric_counter_spec.rb +0.034 +0.034 +0.000
spec/services/test_suite_content/time_execution_hi +0.052 +0.051 +0.001
spec/services/test_suite_onboarding/marketing_cont +0.041 +0.041 +0.000
spec/workers/hubspot_worker/deal_stage_updater_spe +0.314 +0.308 +0.006
spec/workers/test_suite_content/update_test_files_ +0.036 +0.037 -0.001
spec/workers/test_suite_content/update_test_files_ +0.058 +0.058 +0.000

node 16

Path OldTim NewTim Diff F
spec/domain/organization_domain/organization/organ +0.048 +0.048 +0.000
spec/domain/project_domain/build_distribution/buil +0.067 +0.066 +0.001
spec/domain/project_domain/test_suite/test_suite_e +0.058 +0.058 +0.000
spec/domain/project_domain/test_suite/test_suite_l +0.047 +0.046 +0.001
spec/features/dashboard/billing/subscription_error +13.106 +13.106 +0.000
spec/features/dashboard/builds/build_distribution_ +1.784 +1.513 +0.271 ⚠️
spec/mailers/gdpr/organization_mailer_spec.rb +0.330 +0.328 +0.002
spec/mailers/notify_mailer_spec.rb[1:10:14:2:1] +0.055 +0.056 -0.001
spec/mailers/notify_mailer_spec.rb[1:10:2:1] +0.057 +0.056 +0.001
spec/mailers/notify_mailer_spec.rb[1:10:3:1] +0.057 +0.057 +0.000
spec/mailers/notify_mailer_spec.rb[1:11:10:1] +0.043 +0.044 -0.001
spec/mailers/notify_mailer_spec.rb[1:11:12:1] +0.052 +0.053 -0.001
spec/mailers/notify_mailer_spec.rb[1:11:13:1] +0.049 +0.048 +0.001
spec/mailers/notify_mailer_spec.rb[1:11:16:2:1] +0.044 +0.044 +0.000
spec/mailers/notify_mailer_spec.rb[1:11:16:5:1] +0.052 +0.052 +0.000
spec/mailers/notify_mailer_spec.rb[1:11:1:1] +0.044 +0.045 -0.001
spec/mailers/notify_mailer_spec.rb[1:11:8:1] +0.043 +0.044 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:1:1:2:1] +0.030 +0.031 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:1:3:1] +0.040 +0.041 -0.001
spec/mailers/notify_mailer_spec.rb[1:6:1:1] +0.061 +0.062 -0.001
spec/mailers/notify_mailer_spec.rb[1:6:3:12:1] +0.058 +0.059 -0.001
spec/mailers/notify_mailer_spec.rb[1:6:3:3:1] +0.064 +0.061 +0.003
spec/mailers/notify_mailer_spec.rb[1:7:3:13:1] +0.058 +0.057 +0.001
spec/mailers/notify_mailer_spec.rb[1:7:3:14:1] +0.080 +0.080 +0.000
spec/mailers/notify_mailer_spec.rb[1:7:3:16:1] +0.066 +0.066 +0.000
spec/mailers/notify_mailer_spec.rb[1:7:3:2:1] +0.066 +0.067 -0.001
spec/mailers/notify_mailer_spec.rb[1:7:3:3:1] +0.071 +0.071 +0.000
spec/mailers/notify_mailer_spec.rb[1:7:3:4:1] +0.058 +0.059 -0.001
spec/mailers/notify_mailer_spec.rb[1:7:3:5:1] +0.060 +0.061 -0.001
spec/models/build_spec.rb +0.577 +0.295 +0.282 ⚠️
spec/models/feature_toggle_spec.rb +0.071 +0.070 +0.001
spec/services/gdpr/user_repository_spec.rb +0.267 +0.265 +0.002
spec/services/independent_build_counter_spec.rb +0.038 +0.038 +0.000
spec/services/missing_payment_checker_spec.rb +0.462 +0.455 +0.007
spec/services/test_suite_onboarding/steps/did_not_ +0.896 +0.894 +0.002
spec/workers/billing/remove_preceding_credit_card_ +0.057 +0.056 +0.001
spec/workers/heroku_worker/exchange_grant_code_wor +0.455 +0.454 +0.001
spec/workers/hubspot_worker/api_usage_deal_note_cr +0.302 +0.300 +0.002
spec/workers/hubspot_worker/deal_updater_spec.rb +0.091 +0.090 +0.001
spec/workers/profit_well/upsert_customer_traits_wo +0.663 +0.053 +0.610 ⚠️
spec/workers/remove_user_seat_metrics_worker_spec. +0.072 +0.071 +0.001
spec/workers/test_suite_content/update_test_files_ +0.050 +0.050 +0.000
spec/workers/test_suite_onboarding/marketing_conta +0.068 +0.066 +0.002
spec/workers/test_suite_onboarding/rspec_split_by_ +2.069 +2.068 +0.001

node 17

Path OldTim NewTim Diff F
spec/domain/knapsack_domain/build_distribution/bui +0.128 +0.125 +0.003
spec/domain/project_domain/test_suite/test_suite_v +0.156 +0.154 +0.002
spec/features/ci_servers_spec.rb +7.915 +7.646 +0.269 ⚠️
spec/features/dashboard/builds/build_distribution_ +1.655 +1.373 +0.282 ⚠️
spec/features/dashboard/main_spec.rb +19.018 +19.010 +0.008
spec/helpers/time_helper_spec.rb +0.541 +0.114 +0.427 ⚠️
spec/mailers/notify_mailer_spec.rb[1:10:15:1:1] +0.079 +0.079 +0.000
spec/mailers/notify_mailer_spec.rb[1:5:5:17:1] +0.092 +0.094 -0.002
spec/mailers/notify_mailer_spec.rb[1:5:6:2:1] +0.129 +0.129 +0.000
spec/mailers/notify_mailer_spec.rb[1:5:6:3:1] +0.098 +0.099 -0.001
spec/mailers/notify_mailer_spec.rb[1:5:6:5:1] +0.097 +0.099 -0.002
spec/mailers/notify_mailer_spec.rb[1:6:3:17:1] +0.066 +0.067 -0.001
spec/mailers/notify_mailer_spec.rb[1:7:2:1] +0.069 +0.071 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:3:4:1] +0.139 +0.137 +0.002
spec/mailers/notify_mailer_spec.rb[1:8:4:15:1] +0.091 +0.093 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:6:1] +0.088 +0.087 +0.001
spec/mailers/notify_mailer_spec.rb[1:9:4:6:1] +0.099 +0.099 +0.000
spec/requests/api/v1/home_spec.rb +0.838 +0.833 +0.005
spec/requests/faqs_spec.rb +6.250 +5.938 +0.312 ⚠️
spec/services/heroku/api/addons_spec.rb +1.230 +1.229 +0.001
spec/services/heroku/api/oauth/token_spec.rb +1.006 +0.715 +0.291 ⚠️
spec/services/heroku/plan_checker_spec.rb +0.546 +0.541 +0.005
spec/services/heroku/utils_spec.rb +0.140 +0.138 +0.002
spec/services/hubspot_crm/api/deal_spec.rb +0.320 +0.318 +0.002
spec/workers/cache_build_distribution_worker_spec. +0.138 +0.136 +0.002
spec/workers/mail_chimp_worker/delete_from_onboard +0.092 +0.091 +0.001
spec/workers/send_grid_worker/unsubscribes_worker_ +0.106 +0.105 +0.001

node 18

Path OldTim NewTim Diff F
spec/features/dashboard/builds/build_distribution_ +3.605 +3.605 +0.000
spec/validators/customer_validator_spec.rb +2.438 +2.428 +0.010 ⚠️

node 19

Path OldTim NewTim Diff F
spec/domain/project_domain/node/node_value_spec.rb +0.106 +0.104 +0.002
spec/domain/project_domain/project/project_validat +0.063 +0.063 +0.000
spec/features/dashboard/billing/subscription_happy +19.376 +19.376 +0.000
spec/features/dashboard/builds/build_distribution_ +1.078 +1.079 -0.001
spec/features/dashboard/builds/build_distribution_ +1.532 +1.240 +0.292 ⚠️
spec/features/dashboard/invoices_spec.rb +7.031 +6.728 +0.303 ⚠️
spec/features/dashboard/organizations_spec.rb +4.646 +4.393 +0.253 ⚠️
spec/mailers/notify_mailer_spec.rb[1:10:11:1] +0.046 +0.047 -0.001
spec/mailers/notify_mailer_spec.rb[1:5:5:14:1] +0.110 +0.111 -0.001
spec/mailers/notify_mailer_spec.rb[1:5:5:2:1] +0.088 +0.090 -0.002
spec/mailers/notify_mailer_spec.rb[1:5:6:10:1] +0.103 +0.105 -0.002
spec/mailers/notify_mailer_spec.rb[1:5:6:12:1] +0.089 +0.090 -0.001
spec/mailers/notify_mailer_spec.rb[1:5:6:14:1] +0.080 +0.080 +0.000
spec/mailers/notify_mailer_spec.rb[1:5:6:15:1] +0.084 +0.086 -0.002
spec/mailers/notify_mailer_spec.rb[1:6:2:1] +0.068 +0.069 -0.001
spec/mailers/notify_mailer_spec.rb[1:6:3:2:1] +0.058 +0.060 -0.002
spec/mailers/notify_mailer_spec.rb[1:6:3:8:1] +0.059 +0.061 -0.002
spec/mailers/notify_mailer_spec.rb[1:7:3:1:1] +0.074 +0.075 -0.001
spec/mailers/notify_mailer_spec.rb[1:7:3:7:1] +0.075 +0.076 -0.001
spec/mailers/notify_mailer_spec.rb[1:8:11:1:1] +0.077 +0.078 -0.001
spec/mailers/notify_mailer_spec.rb[1:8:3:15:1] +0.075 +0.077 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:3:16:1] +0.081 +0.082 -0.001
spec/mailers/notify_mailer_spec.rb[1:8:3:1:1] +0.075 +0.076 -0.001
spec/mailers/notify_mailer_spec.rb[1:8:4:8:1] +0.079 +0.080 -0.001
spec/mailers/notify_mailer_spec.rb[1:9:3:3:1] +0.086 +0.087 -0.001
spec/mailers/notify_mailer_spec.rb[1:9:3:7:1] +0.103 +0.104 -0.001
spec/mailers/notify_mailer_spec.rb[1:9:4:13:1] +0.247 +0.246 +0.001
spec/mailers/notify_mailer_spec.rb[1:9:4:3:1] +0.095 +0.094 +0.001
spec/mailers/notify_mailer_spec.rb[1:9:4:7:1] +0.090 +0.089 +0.001
spec/requests/api/track_ci_provider_spec.rb +0.258 +0.256 +0.002
spec/requests/heroku/resources_spec.rb +2.227 +2.210 +0.017 ⚠️
spec/requests/sitemaps_spec.rb +1.985 +1.697 +0.288 ⚠️
spec/services/billing/user_seats_plan_determiner_s +0.615 +0.302 +0.313 ⚠️
spec/services/infakt/api/v3/invoice_spec.rb +0.275 +0.269 +0.006
spec/services/marketing_content_spec.rb +0.580 +0.094 +0.486 ⚠️
spec/services/popular_domain_finder_spec.rb +0.060 +0.059 +0.001
spec/services/team_member_inviter_spec.rb +0.110 +0.109 +0.001
spec/services/test_suite_onboarding/steps/api_usag +0.088 +0.087 +0.001
spec/services/trial_expiration_checker_spec.rb +0.118 +0.117 +0.001
spec/workers/billing/deactivate_monthly_subscripti +0.261 +0.258 +0.003
spec/workers/remove_expired_cache_items_worker_spe +0.061 +0.061 +0.000

node 20

Path OldTim NewTim Diff F
spec/controllers/api/v1/build_distributions_contro +0.253 +0.250 +0.003
spec/domain/project_domain/build_distribution/buil +0.196 +0.194 +0.002
spec/domain/project_domain/test_file/test_suite_re +0.189 +0.185 +0.004
spec/features/about_spec.rb +0.143 +0.143 +0.000
spec/features/blocked_user_spec.rb +1.012 +0.764 +0.248 ⚠️
spec/features/contact_spec.rb +0.842 +0.842 +0.000
spec/features/dashboard/billing/subscription_error +35.019 +35.019 +0.000
spec/features/dashboard/billing/subscription_error +2.921 +2.651 +0.270 ⚠️
spec/features/dashboard/builds/build_distribution_ +2.441 +2.441 +0.000
spec/mailers/notify_mailer_spec.rb[1:10:14:5:1] +0.036 +0.038 -0.002
spec/mailers/notify_mailer_spec.rb[1:5:3:1] +0.062 +0.064 -0.002
spec/mailers/notify_mailer_spec.rb[1:5:5:15:1] +0.082 +0.085 -0.003
spec/mailers/notify_mailer_spec.rb[1:5:5:1:1] +0.064 +0.067 -0.003
spec/mailers/notify_mailer_spec.rb[1:5:5:5:1] +0.085 +0.086 -0.001
spec/mailers/notify_mailer_spec.rb[1:5:5:9:1] +0.064 +0.066 -0.002
spec/mailers/notify_mailer_spec.rb[1:5:6:6:1] +0.062 +0.064 -0.002
spec/mailers/notify_mailer_spec.rb[1:5:6:7:1] +0.063 +0.066 -0.003
spec/mailers/notify_mailer_spec.rb[1:6:3:11:1] +0.041 +0.043 -0.002
spec/mailers/notify_mailer_spec.rb[1:6:3:6:1] +0.041 +0.043 -0.002
spec/mailers/notify_mailer_spec.rb[1:7:3:12:1] +0.041 +0.043 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:2:1] +0.056 +0.058 -0.002
spec/mailers/notify_mailer_spec.rb[1:8:4:10:1] +0.060 +0.062 -0.002
spec/mailers/notify_mailer_spec.rb[1:9:3:8:1] +0.059 +0.060 -0.001
spec/mailers/notify_mailer_spec.rb[1:9:4:10:1] +0.065 +0.068 -0.003
spec/mailers/notify_mailer_spec.rb[1:9:4:1:1] +0.055 +0.058 -0.003
spec/mailers/notify_mailer_spec.rb[1:9:4:2:1] +0.057 +0.060 -0.003
spec/mailers/notify_mailer_spec.rb[1:9:4:4:1] +0.058 +0.061 -0.003
spec/mailers/notify_mailer_spec.rb[1:9:4:5:1] +0.057 +0.060 -0.003
spec/requests/dashboard/invoices_spec.rb +0.605 +0.321 +0.284 ⚠️
spec/requests/invalid_json_payload_spec.rb +0.305 +0.304 +0.001
spec/services/autologin/token_creator_spec.rb +0.063 +0.062 +0.001
spec/services/billing/invoices_analyzer_spec.rb +0.082 +0.081 +0.001
spec/services/people_email_service_spec.rb +0.073 +0.072 +0.001
spec/workers/billing/subscription_went_past_due_wo +0.413 +0.048 +0.365 ⚠️
spec/workers/remove_build_authors_worker_spec.rb +0.054 +0.053 +0.001

node 21

Path OldTim NewTim Diff F
spec/features/dashboard/builds/build_distribution_ +3.342 +3.342 +0.000
spec/features/login_spec.rb +1.185 +1.184 +0.001

node 22

Path OldTim NewTim Diff F
spec/config/testing_frameworks_spec.rb +0.582 +0.303 +0.279 ⚠️
spec/domain/project_domain/cache_build_distributio +0.128 +0.125 +0.003
spec/domain/project_domain/test_file/test_file_col +0.088 +0.087 +0.001
spec/features/dashboard/billing/subscription_error +11.000 +10.728 +0.272 ⚠️
spec/features/dashboard/builds/build_distribution_ +1.955 +1.955 +0.000
spec/features/dashboard/builds/build_distribution_ +1.362 +1.362 +0.000
spec/features/dashboard/identity_providers_spec.rb +14.178 +14.174 +0.004
spec/form_objects/identity_provider_form_spec.rb +1.670 +1.376 +0.294 ⚠️
spec/mailers/notify_mailer_spec.rb[1:5:4:1] +0.094 +0.095 -0.001
spec/mailers/notify_mailer_spec.rb[1:5:6:9:1] +0.084 +0.085 -0.001
spec/mailers/notify_mailer_spec.rb[1:6:3:5:1] +0.063 +0.063 +0.000
spec/mailers/notify_mailer_spec.rb[1:8:3:8:1] +0.079 +0.080 -0.001
spec/mailers/notify_mailer_spec.rb[1:8:4:4:1] +0.085 +0.086 -0.001
spec/mailers/notify_mailer_spec.rb[1:9:11:1:1] +0.140 +0.139 +0.001
spec/mailers/notify_mailer_spec.rb[1:9:3:17:1] +0.264 +0.265 -0.001
spec/mailers/notify_mailer_spec.rb[1:9:3:1:1] +0.091 +0.092 -0.001
spec/mailers/notify_mailer_spec.rb[1:9:3:9:1] +0.087 +0.087 +0.000
spec/requests/sign_in_spec.rb +0.521 +0.096 +0.425 ⚠️
spec/services/build_authors_analyzer_spec.rb +2.801 +2.509 +0.292 ⚠️
spec/services/gdpr/user_redactor_spec.rb +0.460 +0.457 +0.003
spec/workers/billing/activate_monthly_subscription +0.139 +0.137 +0.002
spec/workers/billing/send_invoice_worker_spec.rb +0.415 +0.413 +0.002
spec/workers/billing/vat_number_validation_worker_ +0.636 +0.635 +0.001
spec/workers/build_distribution_metric_worker_spec +0.123 +0.121 +0.002
spec/workers/gdpr/notify_orphaned_user_approaching +0.158 +0.156 +0.002
spec/workers/mail_chimp_worker/subscribe_to_onboar +0.084 +0.083 +0.001
spec/workers/not_run_first_build_worker_spec.rb +0.138 +0.137 +0.001
spec/workers/track_queue_worker_spec.rb +0.170 +0.168 +0.002

node 23

Path OldTim NewTim Diff F
spec/domain/knapsack_domain/knapsack_flat/nodes_fl +0.037 +0.036 +0.001
spec/domain/knapsack_domain/queue/queue_cache_mana +0.028 +0.028 +0.000
spec/domain/project_domain/build_subset/build_subs +0.497 +0.037 +0.460 ⚠️
spec/domain/project_domain/test_file/test_file_fin +0.039 +0.038 +0.001
spec/domain/project_domain/test_file/test_file_val +0.222 +0.218 +0.004
spec/features/dashboard/billing/subscription_error +2.810 +2.550 +0.260 ⚠️
spec/features/dashboard/billing/trial_period_messa +6.452 +6.178 +0.274 ⚠️
spec/features/dashboard/builds/build_distribution_ +1.424 +1.147 +0.277 ⚠️
spec/features/terms_and_conditions_spec.rb +0.591 +0.212 +0.379 ⚠️
spec/lib/ext/base_repository_spec.rb +0.048 +0.047 +0.001
spec/mailers/notify_mailer_spec.rb[1:10:9:1] +0.045 +0.043 +0.002
spec/mailers/notify_mailer_spec.rb[1:11:15:1] +0.036 +0.036 +0.000
spec/mailers/notify_mailer_spec.rb[1:11:16:4:1] +0.038 +0.039 -0.001
spec/mailers/notify_mailer_spec.rb[1:11:17:1:1] +0.035 +0.036 -0.001
spec/mailers/notify_mailer_spec.rb[1:11:18:1:1] +0.039 +0.040 -0.001
spec/mailers/notify_mailer_spec.rb[1:11:3:1] +0.035 +0.036 -0.001
spec/mailers/notify_mailer_spec.rb[1:11:4:1] +0.036 +0.037 -0.001
spec/mailers/notify_mailer_spec.rb[1:11:7:1] +0.036 +0.037 -0.001
spec/mailers/notify_mailer_spec.rb[1:12:3] +0.013 +0.014 -0.001
spec/mailers/notify_mailer_spec.rb[1:12:5] +0.016 +0.017 -0.001
spec/mailers/notify_mailer_spec.rb[1:12:7] +0.013 +0.014 -0.001
spec/mailers/notify_mailer_spec.rb[1:1:10:1] +0.023 +0.024 -0.001
spec/mailers/notify_mailer_spec.rb[1:1:12:1] +0.023 +0.024 -0.001
spec/mailers/notify_mailer_spec.rb[1:1:13:1:1] +0.026 +0.026 +0.000
spec/mailers/notify_mailer_spec.rb[1:1:1:1] +0.023 +0.024 -0.001
spec/mailers/notify_mailer_spec.rb[1:1:2:1] +0.024 +0.024 +0.000
spec/mailers/notify_mailer_spec.rb[1:1:3:1] +0.023 +0.024 -0.001
spec/mailers/notify_mailer_spec.rb[1:1:4:1] +0.023 +0.024 -0.001
spec/mailers/notify_mailer_spec.rb[1:1:8:1] +0.023 +0.024 -0.001
spec/mailers/notify_mailer_spec.rb[1:1:9:1] +0.025 +0.025 +0.000
spec/mailers/notify_mailer_spec.rb[1:2:1:1:3:1] +0.027 +0.028 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:2:3:1] +0.017 +0.018 -0.001
spec/mailers/notify_mailer_spec.rb[1:2:2:4:1] +0.017 +0.018 -0.001
spec/mailers/notify_mailer_spec.rb[1:6:3:10:1] +0.046 +0.047 -0.001
spec/mailers/notify_mailer_spec.rb[1:6:3:15:1] +0.046 +0.046 +0.000
spec/mailers/notify_mailer_spec.rb[1:7:3:15:1] +0.048 +0.047 +0.001
spec/mailers/notify_mailer_spec.rb[1:9:3:2:1] +0.098 +0.097 +0.001
spec/mailers/team_member_mailer_spec.rb +0.054 +0.054 +0.000
spec/models/build_subset_spec.rb +0.190 +0.188 +0.002
spec/models/commit_author_spec.rb +0.044 +0.044 +0.000
spec/requests/dashboard/builds_spec.rb +0.784 +0.781 +0.003
spec/requests/permalinks_spec.rb +2.535 +2.532 +0.003
spec/services/autologin/token_canceler_spec.rb +0.032 +0.032 +0.000
spec/services/hubspot_crm/api/contact_spec.rb +0.161 +0.159 +0.002
spec/services/hubspot_crm/utils_spec.rb +0.024 +0.023 +0.001
spec/services/saml/identity_provider_draft_validat +0.032 +0.032 +0.000
spec/services/send_grid_api/group_unsubscribes_cre +0.039 +0.039 +0.000
spec/services/test_suite_content/time_execution_po +0.029 +0.029 +0.000
spec/services/test_suite_onboarding/steps/no_reque +0.043 +0.043 +0.000
spec/workers/billing/notify_admin_about_trial_endi +0.137 +0.136 +0.001
spec/workers/gdpr/force_organization_redaction_wor +0.120 +0.119 +0.001
spec/workers/hubspot_worker/contact_gdpr_deleter_s +0.037 +0.036 +0.001
spec/workers/remove_redundant_build_distributions_ +0.164 +0.162 +0.002
spec/workers/send_grid_worker/contact_gdpr_deleter +0.035 +0.035 +0.000
spec/workers/test_suite_content/update_test_files_ +0.022 +0.022 +0.000
spec/workers/test_suite_content/update_test_files_ +25.152 +25.152 +0.000
spec/workers/track_user_seat_worker_spec.rb +0.177 +0.175 +0.002

export VERBOSE=1 NEW_TIME_TRACKER=1

Details

https://knapsackpro.com/dashboard/organizations/54/projects/730/test_suites/3201/builds/9d327bbb-1a16-4434-8e73-a830e7cf47c6#tab-test-files

https://app.circleci.com/pipelines/github/KnapsackPro/knapsack-pro-api/6051/workflows/be830bcb-5646-4214-96b4-d173f130e2d9/jobs/8866

build_ids = ["9d327bbb-1a16-4434-8e73-a830e7cf47c6", "a0c32cea-52ef-4e63-b719-d683d0c6fcb7"]
test_file_paths = build_ids.map do |build_id|
build_distribution_repository = BuildDistributionRepository.new
build_distribution_entity = build_distribution_repository.last_for_build_id(build_id)
build_distribution = BuildDistributionDecorator.new(build_distribution_entity)
test_suite = TestSuite.find(3201)
test_files = Views::BuildPageTestFiles.new(test_suite, build_distribution)
# test_files.size
test_files.to_a.map(&:path)
end

new, old = test_file_paths
new.size
=> 383

old.size
=> 650

new - old
["spec/features/dashboard/main_spec.rb",
 "spec/mailers/notify_mailer_spec.rb",
 "spec/workers/trial_period_worker_spec.rb[1:3:2:1:7:1:1]",
 "spec/features/dashboard/builds/builds_for_test_suite_spec.rb[1:1:1:1:1]",
 "spec/workers/trial_period_worker_spec.rb[1:3:2:1:2:1:1]",
 "spec/workers/trial_period_worker_spec.rb[1:3:2:1:5:1:1]",
 "spec/features/dashboard/builds/builds_for_test_suite_spec.rb[1:1:3:2:1]",
 "spec/features/dashboard/builds/builds_for_test_suite_spec.rb[1:1:1:2:1]",
 "spec/features/dashboard/builds/builds_for_test_suite_spec.rb[1:1:3:1]",
 "spec/features/dashboard/builds/builds_for_test_suite_spec.rb[1:1:1:3:1]",
 "spec/features/dashboard/builds/builds_for_test_suite_spec.rb[1:1:2:1]",
 "spec/workers/trial_period_worker_spec.rb[1:3:1:1:1:1]",
 "spec/workers/trial_period_worker_spec.rb[1:3:2:1:3:1:1]",
 "spec/workers/trial_period_worker_spec.rb[1:3:2:1:6:1:1]",
 "spec/workers/trial_period_worker_spec.rb[1:3:2:1:1:1]",
 "spec/workers/trial_period_worker_spec.rb[1:3:1:2:1]",
 "spec/workers/trial_period_worker_spec.rb[1:3:1:1:2:1]",
 "spec/workers/trial_period_worker_spec.rb[1:3:2:1:4:1:1]",
 "spec/workers/trial_period_worker_spec.rb[1:2]",
 "spec/workers/trial_period_worker_spec.rb[1:1]"]

old - new
["spec/workers/trial_period_worker_spec.rb",
 "spec/features/dashboard/builds/builds_for_test_suite_spec.rb",
 "spec/features/dashboard/main_spec.rb[1:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:5:1]",
 "spec/features/dashboard/main_spec.rb[1:1:6:2:1]",
 "spec/features/dashboard/main_spec.rb[1:1:4:1]",
 "spec/features/dashboard/main_spec.rb[1:1:8:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:2:1:2:1]",
 "spec/features/dashboard/main_spec.rb[1:2:1]",
 "spec/features/dashboard/main_spec.rb[1:1:9:1:2]",
 "spec/features/dashboard/main_spec.rb[1:1:7:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:6:3:1]",
 "spec/features/dashboard/main_spec.rb[1:1:9:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:7:2:1]",
 "spec/features/dashboard/main_spec.rb[1:1:2:1:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:6:1]",
 "spec/features/dashboard/main_spec.rb[1:1:3:1]",
 "spec/features/dashboard/main_spec.rb[1:1:9:2:2]",
 "spec/features/dashboard/main_spec.rb[1:1:8:2:1]",
 "spec/features/dashboard/main_spec.rb[1:3:1]",
 "spec/features/dashboard/main_spec.rb[1:1:9:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:3:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:17:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:17:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:17:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:14:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:16:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:11:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:10:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:16:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:10:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:11:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:9:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:17:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:16:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:12:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:16:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:18:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:19:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:9:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:16:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:17:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:14:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:16:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:16:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:16:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:16:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:16:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:14:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:14:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:17:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:14:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:12:2]",
 "spec/mailers/notify_mailer_spec.rb[1:10:15:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:3:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:3:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:3:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:13:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:12:6]",
 "spec/mailers/notify_mailer_spec.rb[1:1:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:1:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:1:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:1:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:1:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:1:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:1:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:1:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:1:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:1:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:1:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:12:4]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:6:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:1:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:1:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:6:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:12:7]",
 "spec/mailers/notify_mailer_spec.rb[1:12:5]",
 "spec/mailers/notify_mailer_spec.rb[1:12:3]",
 "spec/mailers/notify_mailer_spec.rb[1:12:1]"]

export VERBOSE=1 NEW_TIME_TRACKER=1 and retried

Details

https://app.circleci.com/pipelines/github/KnapsackPro/knapsack-pro-api/6052

https://knapsackpro.com/dashboard/organizations/54/projects/730/test_suites/3201/builds/34b9b526-a05f-45e0-9334-9ce181a90e89

build_ids = ["34b9b526-a05f-45e0-9334-9ce181a90e89", "a0c32cea-52ef-4e63-b719-d683d0c6fcb7"]

test_file_paths = build_ids.map do |build_id|
build_distribution_repository = BuildDistributionRepository.new
build_distribution_entity = build_distribution_repository.last_for_build_id(build_id)
build_distribution = BuildDistributionDecorator.new(build_distribution_entity)
test_suite = TestSuite.find(3201)
test_files = Views::BuildPageTestFiles.new(test_suite, build_distribution)
# test_files.size
test_files.to_a.map(&:path)
end

new, old = test_file_paths
new.size
=> 367

old.size
=> 650

new - old
["spec/mailers/notify_mailer_spec.rb", "spec/features/dashboard/main_spec.rb"]

old - new
["spec/features/dashboard/main_spec.rb[1:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:5:1]",
 "spec/features/dashboard/main_spec.rb[1:1:6:2:1]",
 "spec/features/dashboard/main_spec.rb[1:1:4:1]",
 "spec/features/dashboard/main_spec.rb[1:1:8:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:2:1:2:1]",
 "spec/features/dashboard/main_spec.rb[1:2:1]",
 "spec/features/dashboard/main_spec.rb[1:1:9:1:2]",
 "spec/features/dashboard/main_spec.rb[1:1:7:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:6:3:1]",
 "spec/features/dashboard/main_spec.rb[1:1:9:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:7:2:1]",
 "spec/features/dashboard/main_spec.rb[1:1:2:1:1:1]",
 "spec/features/dashboard/main_spec.rb[1:1:6:1]",
 "spec/features/dashboard/main_spec.rb[1:1:3:1]",
 "spec/features/dashboard/main_spec.rb[1:1:9:2:2]",
 "spec/features/dashboard/main_spec.rb[1:1:8:2:1]",
 "spec/features/dashboard/main_spec.rb[1:3:1]",
 "spec/features/dashboard/main_spec.rb[1:1:9:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:3:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:17:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:17:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:17:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:14:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:16:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:11:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:10:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:16:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:10:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:11:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:9:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:17:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:16:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:5:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:5:6:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:3:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:4:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:4:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:12:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:16:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:18:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:9:3:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:19:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:8:9:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:16:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:17:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:14:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:6:3:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:16:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:16:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:16:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:16:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:16:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:14:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:14:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:17:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:14:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:7:3:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:15:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:13:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:11:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:10:14:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:12:2]",
 "spec/mailers/notify_mailer_spec.rb[1:10:15:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:3:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:10:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:3:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:3:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:13:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:12:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:6:1]",
 "spec/mailers/notify_mailer_spec.rb[1:12:6]",
 "spec/mailers/notify_mailer_spec.rb[1:1:11:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:1:9:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:1:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:1:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:1:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:1:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:1:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:1:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:1:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:1:1:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:1:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:3:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:5:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:1:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:7:1]",
 "spec/mailers/notify_mailer_spec.rb[1:12:4]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:4:8:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:6:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:1:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:1:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:3:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:6:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:7:1:1]",
 "spec/mailers/notify_mailer_spec.rb[1:2:2:4:1]",
 "spec/mailers/notify_mailer_spec.rb[1:4:2:1]",
 "spec/mailers/notify_mailer_spec.rb[1:12:7]",
 "spec/mailers/notify_mailer_spec.rb[1:12:5]",
 "spec/mailers/notify_mailer_spec.rb[1:12:3]",
 "spec/mailers/notify_mailer_spec.rb[1:12:1]"]

While working on this change, I noticed the following bugs in the current tracker:

  • The first test executed in a subset includes the API call to get the list of paths to execute; this contributes to an additional few hundreds milliseconds. Though, if the first test in the subset fails or is pending, the time tracked is correct. You can clearly see it on this build on CircleCI: see that the flagged tests in each artifact.txt is the first test run in each subset.
  • spec/controllers/shared_articles_controller_spec.rb is counted as:
    {"path"=>"spec/controllers/shared.rb", "time_execution"=>0.10030300030484796}
    {"path"=>"spec/controllers/shared_articles_controller_spec.rb", "time_execution"=>0.0}
  • spec/track_context_time_spec.rb does not account for the hooks properly (it should be ~5.3s and ~5.4s):
    {"path"=>"spec/track_context_time_spec.rb[1:1:1]", "time_execution"=>2.3591590002179146}
    {"path"=>"spec/track_context_time_spec.rb[1:1:2]", "time_execution"=>3.403965000063181}
    

This PR fixes them all for RSpec in both Regular and Queue Mode.


I didn't manage to test the new tracker inside RSpec. When I try to run it as part of bundle exec rspec spec/ it keeps calling itself in an infinite loop. That's why I kept it separate (_specs.rb file). In theory, it's doable because in RSpec they test formatters like the json one.


You'll notice the following code:

        [
          # https://github.com/rspec/rspec-core/blob/1eeadce5aa7137ead054783c31ff35cbfe9d07cc/lib/rspec/core/example.rb#L122
          -> { example.id.match(/\A(.*?)(?:\[([\d\s:,]+)\])?\z/).captures.first },
          -> { example.metadata[:file_path] },
          -> { example.metadata[:example_group][:file_path] },
          -> { top_level_group(example)[:file_path] },
        ]

We need it because of some edge cases I noticed by running the tests in rails-app-with-knapsack_pro.

In particular, we need example.id.match(/\A(.*?)(?:\[([\d\s:,]+)\])?\z/).captures.first for:

# id: ./spec/slow_shared_examples_spec.rb[1:1:1]
# example_file_path: ./spec/support/shared_examples/slow.rb
# group_file_path: ./spec/slow_shared_examples_spec.rb
# top_level_file_path: ./spec/slow_shared_examples_spec.rb

or for:

# id: ./spec/services/calculator_spec.rb
# example_file_path: ./spec/support/shared_examples/calculator.rb
# group_file_path: ./spec/support/shared_examples/calculator.rb
# top_level_file_path: ./spec/services/calculator_spec.rb

We need example.metadata[:file_path] for:

# id: ./spec/controllers/shared.rb[1:1:1:1:1]
# example_file_path: ./spec/controllers/shared_articles_controller_spec.rb
# group_file_path: ./spec/controllers/shared.rb
# top_level_file_path: ./spec/controllers/shared.rb

I didn't find a need for the others, but I think it makes sense to try paths in order of specificity, and id -> example -> group -> top level group seemed to make sense.

Notice that this also fixes the problem with spec/controllers/shared_articles_controller_spec.rb mentioned above.


Questions for Artur:

  • I noticed we currently send times for failed specs. Is it by design? Or should we filter them out? Artur: By design
  • Should we apply this to Regular mode? I can look at doing it as part of this PR. Done
  • How would you bump this one? Artur: Major

@3v0k4 3v0k4 force-pushed the rspec-time-tracker branch 4 times, most recently from f8b786c to 61b3bcc Compare November 14, 2023 11:26
@3v0k4 3v0k4 requested a review from ArturT November 14, 2023 13:29
@ArturT
Copy link
Copy Markdown
Member

ArturT commented Nov 16, 2023

Also, I run a build on CircleCI with:

The pending test spec/channels/test_channel_spec.rb is not tracked for CI build using export VERBOSE=1 NEW_TIME_TRACKER=1. We expect to show pending tests as 0s on the list of executed tests in the Knapsack Pro dashboard. So if someone retries the CI node, we attempt to rerun the pending tests (we need to run exactly the same set of tests. Assuming someone uses KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true).

export VERBOSE=1:
https://knapsackpro.com/dashboard/organizations/54/projects/730/test_suites/3201/builds/d3b5fabe-194f-488e-9f3e-04c2d16cefc5?test_files_page=7#tab-test-files
spec/channels/test_channel_spec.rb is visible on the list of tests (good)

export VERBOSE=1 NEW_TIME_TRACKER=1:
https://knapsackpro.com/dashboard/organizations/54/projects/730/test_suites/3201/builds/0bc5d550-81d2-4c8f-b4f2-169f42c053cb?test_files_page=7#tab-test-files
spec/channels/test_channel_spec.rb is missing (bad).

A real example other than a pending test that could lead to problem for the user:
A customer had a syntax error in the spec file so it supposed to be recorded as 0s. If not, then when the CI build is manually retried by a user, then CI build could pass green if the spec is not run again on the retried CI node (false positive).

@ArturT
Copy link
Copy Markdown
Member

ArturT commented Nov 16, 2023

I noticed we currently send times for failed specs. Is it by design? Or should we filter them out?

It's by design. We want to track the actual time spent on executing the test file path so that we can better order test files on the API side (from slow to fast in Queue API).


If the test fails (for example, test cases are failing) OR there was a syntax error and the test failed. In both scenarios, we want to report the test file path with execution time to API so that the test file can be run on a retried CI build.

  • If test cases failed. We pass the execution time of the failed test file to API. For example, if a feature spec is green, then the execution time is 10s. When it's red, then its execution time is 3s. I recall this potentially could be problematic if someone fixed the failing spec, and now it is returned from the Queue API as it was 3s (so it was later in the queue) but it would run for 10s because its already fixed. So, tests could not be balanced as well as they could.

But I would not use 0s for failed tests. This could be confusing in the user dashboard and when the spec is returned with 0s execution time in the API response. It would be returned first from the Queue API (possibly good). But if you have many test files like that, how can you know which one is potentially slower.
Also, using 0s for failed tests could mess up the mean execution time of tests and affect frequently changing sets of tests CI builds.

  • If the test was not executed at all (due to syntax) error, it's fine to report 0s of execution time to API. The test would be distributed first from the queue due to the unknown execution time for a new CI build. That's good.

@3v0k4
Copy link
Copy Markdown
Contributor Author

3v0k4 commented Nov 16, 2023

export VERBOSE=1 NEW_TIME_TRACKER=1:
https://knapsackpro.com/dashboard/organizations/54/projects/730/test_suites/3201/builds/0bc5d550-81d2-4c8f-b4f2-169f42c053cb?test_files_page=7#tab-test-files
spec/channels/test_channel_spec.rb is missing (bad).

Nice catch. I'll look into it. I haven't seen that the report (artifact.txt) in the last node shows the recording only for the old tracker, but not the new one: https://app.circleci.com/pipelines/github/KnapsackPro/knapsack-pro-api/5999/workflows/574d7647-ec28-4599-8691-4d44c28a2f3e/jobs/8765/artifacts

A real example other than a pending test that could lead to problem for the user:
A customer had a syntax error in the spec file so it supposed to be recorded as 0s. If not, then when the CI build is manually retried by a user, then CI build could pass green if the spec is not run again on the retried CI node (false positive).

Does RSpec even start with a file containing a syntax error? I'll try tomorrow.

But I would not use 0s for failed tests.

As soon as we start sending the status, we can mark them as failed ;)


Thanks for the CR!

@ArturT
Copy link
Copy Markdown
Member

ArturT commented Nov 16, 2023

Does RSpec even start with a file containing a syntax error?

Yes. You would typically see an error like:

NoMethodError:
  undefined method `ddescribe' for main:Object

if you make a typo (ddescribe instead of describe) or type something out of RSpec context/before/it etc.

I also recall a customer making something that prevented RSpec::Core::Runner from running properly and then the test was not recorded. That's why the knapsack_pro gem assumes at the beginning before starting tests that all test files fetched from Queue API have 0s execution time and later on the 0s is replaced with recorded time (when RSpec::Core::Runner is executed). So even if RSpec::Core::Runner crashes, then we won't lose info about tests assigned to the CI node and we can at the very end report back all test files to API.

I don't know how to reproduce such a crash.

@ArturT
Copy link
Copy Markdown
Member

ArturT commented Nov 16, 2023

If you would be doing clean up of the lib/knapsack_pro/adapters/rspec_adapter.rb file to get rid of using KnapsackPro.tracker in places like bind_time_tracker method. (assuming we would also use KnapsackPro::Formatters::TimeTracker for Regular Mode and then it's safe to clean up the bind_time_tracker method) .
Then please remember we need to keep the following check for rspec split by test examples feature:

if example.metadata[:focus] && KnapsackPro::Adapters::RSpecAdapter.rspec_configuration.filter.rules[:focus]
              raise "We detected a test file path #{current_test_path} with a test using the metadata `:focus` tag. RSpec might not run some tests in the Queue Mode (causing random tests skipping problem). Please remove the `:focus` tag from your codebase. See more: #{KnapsackPro::Urls::RSPEC__SKIPS_TESTS}"
            end

https://github.com/KnapsackPro/knapsack_pro-ruby/blob/b0505b740c3f387670a50463375cb425cc9380d2/lib/knapsack_pro/adapters/rspec_adapter.rb#L99,L101

Comment thread lib/knapsack_pro/formatters/time_tracker.rb Outdated
Comment thread spec/knapsack_pro/runners/queue/rspec_runner_spec.rb Outdated
Comment thread spec/knapsack_pro/runners/queue/rspec_runner_spec.rb Outdated
@ArturT
Copy link
Copy Markdown
Member

ArturT commented Nov 16, 2023

Should we apply this to Regular mode? I can look at doing it as part of this PR.

We could if it's easy to do. I think you would need to add the new formatter to rspec_opts:

t.rspec_opts = "#{args} --default-path #{runner.test_dir} #{runner.stringify_test_file_paths}"

and change the KnapsackPro::Report#save method to use new tracker data like you did for the save_node_queue_to_api method.


After doing that we could remove KnapsackPro.tracker from KnapsackPro::Adapters::RSpecAdapter#bind_time_tracker because it won't be needed. Only keep #229 (comment)

@ArturT
Copy link
Copy Markdown
Member

ArturT commented Nov 16, 2023

How would you bump this one?

We can release a major version of the gem.

One unknown thing is Turnip. I don't recall anyone using it for years. I checked and there are no Turnip users so I think it's safe to ignore it and don't dig into it.

The KnapsackPro::Adapters::RSpecAdapter.test_path method was checking for old Turnip version.
https://github.com/KnapsackPro/knapsack_pro-ruby/blob/61b3bcc54ca58f151fa3c17056c85c35cbbd5c29/lib/knapsack_pro/adapters/rspec_adapter.rb#L60,L61
We could remove the KnapsackPro::Adapters::RSpecAdapter.test_path method if we use the new time formatter in Regular Mode.

Comment thread lib/knapsack_pro/report.rb Outdated
@ArturT
Copy link
Copy Markdown
Member

ArturT commented Nov 16, 2023

While working on this change, I noticed the following bugs in the current tracker:

  • The first test executed in a subset includes the API call to get the list of paths to execute; this contributes to an additional few hundreds milliseconds. Though, if the first test in the subset fails or is pending, the time tracked is correct. You can clearly see it on this build on CircleCI: see that the flagged tests in each artifact.txt is the first test run in each subset.
  • spec/controllers/shared_articles_controller_spec.rb is counted as:
    {"path"=>"spec/controllers/shared.rb", "time_execution"=>0.10030300030484796}
    {"path"=>"spec/controllers/shared_articles_controller_spec.rb", "time_execution"=>0.0}

This problem is gone now thanks to using KnapsackPro::Formatters::TimeTracker, right?

I can imagine if there is a delayed response from our API this was impacting the execution time of the first spec fetched from Queue API, I guess? So it would be nice to not have this issue.

  • spec/track_context_time_spec.rb does not account for the hooks properly (it should be ~5.3s and ~5.4s):
    {"path"=>"spec/track_context_time_spec.rb[1:1:1]", "time_execution"=>2.3591590002179146}
    {"path"=>"spec/track_context_time_spec.rb[1:1:2]", "time_execution"=>3.403965000063181}
    

We can look into fixing those issues in the current tracker in a separate PR.

If we use the KnapsackPro::Formatters::TimeTracker formatter instead of the existing tracker also for regular mode then we won't need to fix the problem for the spec/track_context_time_spec.rb spec. Because the problem is relevant to RSpec only for the current tracker that we won't use for RSpec anymore.

@ArturT
Copy link
Copy Markdown
Member

ArturT commented Nov 16, 2023

I didn't manage to test the new tracker inside RSpec. When I try to run it as part of bundle exec rspec spec/ it keeps calling itself in an infinite loop. That's why I kept it separate. In theory, it's doable because in RSpec they test formatters like the json one. But I'd leave it as it is.

Just an idea. Maybe there is a better way to make it convenient for the developers.
We could have bin/test script that would run both bundle exec rspec spec and bundle exec rspec spec/ and this way you could quickly run all tests in development.

Maybe bin/test script could capture exit code to ensure it exists with 1. We did something like that in:
https://docs.knapsackpro.com/ruby/cookbook/#run-multiple-test-commands-with-one-script

Also we would need to exclude bin/test from files released as part of the gem package here:
Update spec.executables in knapsack_pro.gemspec.

spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }

@ArturT
Copy link
Copy Markdown
Member

ArturT commented Nov 16, 2023

You'll notice the following code:

      def file_for(example)
        [
          # https://github.com/rspec/rspec-core/blob/1eeadce5aa7137ead054783c31ff35cbfe9d07cc/lib/rspec/core/example.rb#L122
          example.id.match(/\A(.*?)(?:\[([\d\s:,]+)\])?\z/).captures.first,
          example.metadata[:file_path],
          example.metadata[:example_group][:file_path],
        ]
          .find { |path| path.include?('_spec.rb') }
      end

We need it because of some edge cases I noticed by running the tests in rails-app-with-knapsack_pro.

In particular, we need example.id.match(/\A(.*?)(?:\[([\d\s:,]+)\])?\z/).captures.first for:

# id: ./spec/slow_shared_examples_spec.rb[1:1:1]
# example_file_path: ./spec/support/shared_examples/slow.rb
# group_file_path: ./spec/slow_shared_examples_spec.rb

We need example.metadata[:file_path] for:

# id: ./spec/controllers/shared.rb[1:1:1:1:1]
# example_file_path: ./spec/controllers/shared_articles_controller_spec.rb
# group_file_path: ./spec/controllers/shared.rb

I didn't find a need for example.metadata[:example_group][:file_path], but I think it makes sense to try paths in order of specificity, and id -> example -> group seemed to make sense.

Notice that this also fixes the problem with spec/controllers/shared_articles_controller_spec.rb mentioned above.

I was wondering if we need to track files like spec/controllers/shared.rb if there are only shared examples and no examples are execute direct by this file. You can verify that by: bundle exec rspec spec/controllers/shared.rb:

# repository: rails-app-with-knapsack_pro
$ bundle exec rspec spec/controllers/shared.rb

Bundler is using a binstub that was created for a different gem (rspec-core).
You should run `bundle binstub knapsack_pro` to work around a system/bundle conflict.
rspec pid: 31734
No examples found.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
RSpec before suite hook called only once
Run this only when not using Knapsack Pro Queue Mode
before suite
after suite
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
after suite hook called only once
Run this only when not using Knapsack Pro Queue Mode

Finished in 0.01572 seconds (files took 1.49 seconds to load)
0 examples, 0 failures

So 0 examples, 0 failures executed.

But so far we were tracking it spec/controllers/shared.rb and it's visible in the user dashboard for a CI build. I think we were tracking it by accident and it was like that because I did not fix it and it did no harm anyone.

The test file pattern that we use by default to detect files on the disk should not detect the spec/controllers/shared.rb file because the extension is not _spec.rb. So it would be fine to not track it.
We should track execution time correctly only for a test file that is using the shared example, which is spec/slow_shared_examples_spec.rb:

spec/slow_shared_examples_spec.rb
15:  it_behaves_like 'slow shared example test'

The spec/slow_shared_examples_spec.rb file is impacting how long tests are actually running.

A similar case is with spec/support/shared_examples/slow.rb

@3v0k4
Copy link
Copy Markdown
Contributor Author

3v0k4 commented Nov 20, 2023

Just answering to the direct questions in this comment. I'll address the rest in code.

This problem is gone now thanks to using KnapsackPro::Formatters::TimeTracker, right?

Correct. It's fixed.

I was wondering if we need to track files like spec/controllers/shared.rb

I don't have a good answer to this one TBH. The new implementation does not track it.

@ArturT
Copy link
Copy Markdown
Member

ArturT commented Nov 20, 2023

Just answering to the direct questions in this comment. I'll address the rest in code.

This problem is gone now thanks to using KnapsackPro::Formatters::TimeTracker, right?

Correct. It's fixed.

Great.

I was wondering if we need to track files like spec/controllers/shared.rb

I don't have a good answer to this one TBH. The new implementation does not track it.

Ok, let's not track it then. The new implementation will fix the old bug that was never fixed.

@3v0k4 3v0k4 force-pushed the rspec-time-tracker branch 2 times, most recently from 0ebf242 to c3c32c8 Compare November 24, 2023 09:54
Copy link
Copy Markdown
Member

@ArturT ArturT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a few tiny comments. Other than that code looks good.

I found issues while running tests in Queue Mode.

I've updated the bin script:
https://github.com/KnapsackPro/rails-app-with-knapsack_pro/blob/master/bin/knapsack_pro_queue_rspec_record_first_run

I do:

# CI node 0 for commit-v1
$ bin/knapsack_pro_queue_rspec_record_first_run 0 2 commit-v1

# CI node 1 for commit-v2
$ bin/knapsack_pro_queue_rspec_record_first_run 1 2 commit-v1

To run just the whole test suite on a single node I do:

$  bin/knapsack_pro_queue_rspec_record_first_run 0 2 commit-v2

then I get an error at the end of the tests run:

...previous tests executed here

D, [2023-11-24T20:31:05.860983 #66876] DEBUG -- : [knapsack_pro] POST http://api.knapsackpro.test:3000/v1/queues/queue
D, [2023-11-24T20:31:05.861009 #66876] DEBUG -- : [knapsack_pro] API request UUID: 5fcf20bb-0932-48e7-9447-c15b284cc246
D, [2023-11-24T20:31:05.861021 #66876] DEBUG -- : [knapsack_pro] API response:
D, [2023-11-24T20:31:05.861043 #66876] DEBUG -- : [knapsack_pro] {"queue_name"=>"130:5f3a66e9a970e50eb2c246b6e3e6ef8b", "build_subset_id"=>nil, "test_files"=>[{"path"=>"spec/time_helpers_spec.rb", "time_execution"=>3.04385900031775}]}
----------Before Subset Queue Hook - run before the subset of the test suite----------
2nd KnapsackPro::Hooks::Queue.before_subset_queue
before suite

Time travel with ActiveSupport::Testing::TimeHelpers
before all
  travel_back
around each start
before each
after each
around each stop
    is expected to eq 2004 (FAILED - 1)
  travel_to block
around each start
before each
after each
around each stop
    is expected to eq 23 (FAILED - 2)
  travel_to block 2014
around each start
before each
after each
around each stop
    is expected to eq 2004 (FAILED - 3)
after all
after suite
D, [2023-11-24T20:31:08.913764 #66876] DEBUG -- : [knapsack_pro] Global time execution for tests: 03s

W, [2023-11-24T20:31:08.945243 #66876]  WARN -- : [knapsack_pro] RSpec wants to quit.
I, [2023-11-24T20:31:08.946545 #66876]  INFO -- : [knapsack_pro] To retry the last batch of tests fetched from the API Queue, please run the following command on your machine:
I, [2023-11-24T20:31:08.946577 #66876]  INFO -- : [knapsack_pro] bundle exec rspec --format d --default-path spec "spec/time_helpers_spec.rb"
----------After Subset Queue Hook - run after the subset of the test suite----------
2nd KnapsackPro::Hooks::Queue.after_subset_queue
rake aborted!
Knapsack Pro process was terminated!
/Users/artur/Documents/github/knapsack-pro/knapsack_pro-ruby/lib/knapsack_pro/runners/queue/base_runner.rb:45:in `handle_signal!'
/Users/artur/Documents/github/knapsack-pro/knapsack_pro-ruby/lib/knapsack_pro/runners/queue/rspec_runner.rb:44:in `run'
/Users/artur/Documents/github/knapsack-pro/knapsack_pro-ruby/lib/tasks/queue/rspec.rake:19:in `block (3 levels) in <top (required)>'
/Users/artur/.rvm/gems/ruby-3.2.2/bin/ruby_executable_hooks:22:in `eval'
/Users/artur/.rvm/gems/ruby-3.2.2/bin/ruby_executable_hooks:22:in `<main>'
Tasks: TOP => knapsack_pro:queue:rspec_go
(See full trace by running task with --trace)
Coverage report generated for RSpec, rspec_ci_node_0, rspec_ci_node_1 to /Users/artur/Documents/github/knapsack-pro/rails-app-with-knapsack_pro/coverage. 331 / 361 LOC (91.69%) covered.
SimpleCov failed with exit 1%

Maybe this is something you are already working on. You mentioned some edge cases to be resolved during the daily call. I wasn't digging what is causing the process termination.


When I updated the bin script to use Regular Mode bundle exec rake "knapsack_pro:rspec[--format d]" then tests are passing fine for CI node 0, but for the CI node 1 I get an error:

Error on CI node 1:

 bin/knapsack_pro_queue_rspec_record_first_run 1 2 commit-v8
D, [2023-11-24T20:38:13.596701 #68131] DEBUG -- : [knapsack_pro] POST http://api.knapsackpro.test:3000/v1/build_distributions/subset
D, [2023-11-24T20:38:13.596749 #68131] DEBUG -- : [knapsack_pro] API request UUID: d5a7e290-8f9e-43ee-9ed0-ceefd6a0da07
D, [2023-11-24T20:38:13.596764 #68131] DEBUG -- : [knapsack_pro] API response:
D, [2023-11-24T20:38:13.596777 #68131] DEBUG -- : [knapsack_pro] {"code"=>"TEST_SUITE_SPLIT_CACHE_MISS"}
D, [2023-11-24T20:38:13.655467 #68131] DEBUG -- : [knapsack_pro] POST http://api.knapsackpro.test:3000/v1/build_distributions/subset
D, [2023-11-24T20:38:13.655500 #68131] DEBUG -- : [knapsack_pro] API request UUID: 73369113-e66e-4d70-876f-4e79853fab8a
D, [2023-11-24T20:38:13.655517 #68131] DEBUG -- : [knapsack_pro] Test suite split seed: f8e88847-95ac-490f-8cd5-84deccccdbda
D, [2023-11-24T20:38:13.655525 #68131] DEBUG -- : [knapsack_pro] API response:
D, [2023-11-24T20:38:13.655619 #68131] DEBUG -- : [knapsack_pro] {"build_distribution_id"=>"f8e88847-95ac-490f-8cd5-84deccccdbda", "node_index"=>1, "test_files"=>[{"path"=>"spec/slow_shared_examples_spec.rb", "time_execution"=>3.556496000150219}, {"path"=>"spec/time_helpers_spec.rb", "time_execution"=>3.058004999998957}, {"path"=>"spec/controllers/articles_controller_spec.rb", "time_execution"=>0.05578099982813001}, {"path"=>"spec/services/meme_spec.rb", "time_execution"=>0.006351000396534801}, {"path"=>"spec/rake_tasks/dummy_rake_spec.rb", "time_execution"=>0.002675000112503767}, {"path"=>"spec/bar_spec.rb", "time_execution"=>0.001302000135183334}, {"path"=>"spec/dir with spaces/foobar_spec.rb", "time_execution"=>0.001229000044986606}, {"path"=>"spec/foo_spec.rb", "time_execution"=>0.0007069997955113649}, {"path"=>"spec/retry_spec.rb", "time_execution"=>0.0005779999773949385}, {"path"=>"spec/system_exit_spec.rb", "time_execution"=>0.0005030001047998667}, {"path"=>"spec/async/reactor_spec.rb", "time_execution"=>0.0}, {"path"=>"spec/controllers/dashboard/pending_controller_spec.rb", "time_execution"=>0.0}, {"path"=>"spec/controllers/shared_articles_controller_spec.rb", "time_execution"=>0.0}, {"path"=>"spec/controllers/welcome_controller_spec.rb", "time_execution"=>0.0}, {"path"=>"spec/pending_spec.rb", "time_execution"=>0.0}, {"path"=>"spec/vcr_spec.rb", "time_execution"=>0.0}]}
/Users/artur/.rvm/rubies/ruby-3.2.2/bin/ruby -I/Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-core-3.12.1/lib:/Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-support-3.12.0/lib /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-core-3.12.1/exe/rspec --format d --format documentation --format KnapsackPro::Formatters::TimeTracker --default-path spec "spec/slow_shared_examples_spec.rb" "spec/time_helpers_spec.rb" "spec/controllers/articles_controller_spec.rb" "spec/services/meme_spec.rb" "spec/rake_tasks/dummy_rake_spec.rb" "spec/bar_spec.rb" "spec/dir with spaces/foobar_spec.rb" "spec/foo_spec.rb" "spec/retry_spec.rb" "spec/system_exit_spec.rb" "spec/async/reactor_spec.rb" "spec/controllers/dashboard/pending_controller_spec.rb" "spec/controllers/shared_articles_controller_spec.rb" "spec/controllers/welcome_controller_spec.rb" "spec/pending_spec.rb" "spec/vcr_spec.rb"
D, [2023-11-24T20:38:14.001102 #68144] DEBUG -- : [knapsack_pro] Test suite time execution recording enabled.
rspec pid: 68144
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
RSpec before suite hook called only once
Run this only when not using Knapsack Pro Queue Mode
before suite

Example of slow shared examples
before all
around each start
before each
after each
around each stop
  is expected to equal true
  behaves like slow shared example test
around each start
before each
after each
around each stop
    is expected to equal true
after all

Time travel with ActiveSupport::Testing::TimeHelpers
before all
  travel_back
around each start
before each
after each
around each stop
    is expected to eq 2004 (FAILED - 1)
  travel_to block
around each start
before each
after each
around each stop
    is expected to eq 23 (FAILED - 2)
  travel_to block 2014
around each start
before each
after each
around each stop
    is expected to eq 2004 (FAILED - 3)
after all
after suite
D, [2023-11-24T20:38:21.941070 #68144] DEBUG -- : [knapsack_pro] POST http://api.knapsackpro.test:3000/v1/build_subsets
D, [2023-11-24T20:38:21.941107 #68144] DEBUG -- : [knapsack_pro] API request UUID: 128cd314-3248-4d5e-8780-8d2fc082f715
D, [2023-11-24T20:38:21.941118 #68144] DEBUG -- : [knapsack_pro] API response:
D, [2023-11-24T20:38:21.941129 #68144] DEBUG -- : [knapsack_pro]
D, [2023-11-24T20:38:21.941142 #68144] DEBUG -- : [knapsack_pro] Saved time execution report on Knapsack Pro API server.
D, [2023-11-24T20:38:21.941190 #68144] DEBUG -- : [knapsack_pro] Global time execution for tests: 06s
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
after suite hook called only once
Run this only when not using Knapsack Pro Queue Mode

Failures:

  1) Time travel with ActiveSupport::Testing::TimeHelpers travel_back is expected to eq 2004
     Failure/Error: expect(Time.raw_now.year).to be >= 2017

     NoMethodError:
       undefined method `raw_now' for Time:Class
     # ./spec/time_helpers_spec.rb:18:in `block (3 levels) in <top (required)>'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:124:in `block in run'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:110:in `loop'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:110:in `run'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:37:in `block (2 levels) in setup'
     # ./spec/spec_helper.rb:185:in `block (2 levels) in <top (required)>'
     # /Users/artur/Documents/github/knapsack-pro/knapsack_pro-ruby/lib/knapsack_pro/adapters/rspec_adapter.rb:148:in `block (2 levels) in bind_time_tracker2'

  2) Time travel with ActiveSupport::Testing::TimeHelpers travel_to block is expected to eq 23
     Failure/Error: expect(Time.raw_now.year).to be >= 2017

     NoMethodError:
       undefined method `raw_now' for Time:Class
     # ./spec/time_helpers_spec.rb:30:in `block (4 levels) in <top (required)>'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/activesupport-6.1.7.3/lib/active_support/testing/time_helpers.rb:169:in `travel_to'
     # ./spec/time_helpers_spec.rb:26:in `block (3 levels) in <top (required)>'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:124:in `block in run'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:110:in `loop'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:110:in `run'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:37:in `block (2 levels) in setup'
     # ./spec/spec_helper.rb:185:in `block (2 levels) in <top (required)>'
     # /Users/artur/Documents/github/knapsack-pro/knapsack_pro-ruby/lib/knapsack_pro/adapters/rspec_adapter.rb:148:in `block (2 levels) in bind_time_tracker2'

  3) Time travel with ActiveSupport::Testing::TimeHelpers travel_to block 2014 is expected to eq 2004
     Failure/Error: expect(Time.raw_now.year).to be >= 2017

     NoMethodError:
       undefined method `raw_now' for Time:Class
     # ./spec/time_helpers_spec.rb:43:in `block (4 levels) in <top (required)>'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/activesupport-6.1.7.3/lib/active_support/testing/time_helpers.rb:169:in `travel_to'
     # ./spec/time_helpers_spec.rb:39:in `block (3 levels) in <top (required)>'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:124:in `block in run'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:110:in `loop'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:110:in `run'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
     # /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:37:in `block (2 levels) in setup'
     # ./spec/spec_helper.rb:185:in `block (2 levels) in <top (required)>'
     # /Users/artur/Documents/github/knapsack-pro/knapsack_pro-ruby/lib/knapsack_pro/adapters/rspec_adapter.rb:148:in `block (2 levels) in bind_time_tracker2'

Finished in 6.64 seconds (files took 1.47 seconds to load)
5 examples, 3 failures

Failed examples:

rspec ./spec/time_helpers_spec.rb:10 # Time travel with ActiveSupport::Testing::TimeHelpers travel_back is expected to eq 2004
rspec ./spec/time_helpers_spec.rb:25 # Time travel with ActiveSupport::Testing::TimeHelpers travel_to block is expected to eq 23
rspec ./spec/time_helpers_spec.rb:38 # Time travel with ActiveSupport::Testing::TimeHelpers travel_to block 2014 is expected to eq 2004

Coverage report generated for RSpec, rspec_ci_node_0, rspec_ci_node_1 to /Users/artur/Documents/github/knapsack-pro/rails-app-with-knapsack_pro/coverage. 249 / 316 LOC (78.8%) covered.
SimpleCov failed with exit 1/Users/artur/.rvm/rubies/ruby-3.2.2/bin/ruby -I/Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-core-3.12.1/lib:/Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-support-3.12.0/lib /Users/artur/.rvm/gems/ruby-3.2.2/gems/rspec-core-3.12.1/exe/rspec --format d --format documentation --format KnapsackPro::Formatters::TimeTracker --default-path spec "spec/slow_shared_examples_spec.rb" "spec/time_helpers_spec.rb" "spec/controllers/articles_controller_spec.rb" "spec/services/meme_spec.rb" "spec/rake_tasks/dummy_rake_spec.rb" "spec/bar_spec.rb" "spec/dir with spaces/foobar_spec.rb" "spec/foo_spec.rb" "spec/retry_spec.rb" "spec/system_exit_spec.rb" "spec/async/reactor_spec.rb" "spec/controllers/dashboard/pending_controller_spec.rb" "spec/controllers/shared_articles_controller_spec.rb" "spec/controllers/welcome_controller_spec.rb" "spec/pending_spec.rb" "spec/vcr_spec.rb" failed

Comment thread lib/knapsack_pro/adapters/rspec_adapter.rb
Comment thread lib/knapsack_pro/adapters/rspec_adapter.rb
Comment thread lib/knapsack_pro/adapters/rspec_adapter.rb Outdated
Comment thread lib/knapsack_pro/adapters/rspec_adapter.rb Outdated
Comment thread lib/knapsack_pro/formatters/time_tracker.rb Outdated
@3v0k4
Copy link
Copy Markdown
Contributor Author

3v0k4 commented Nov 27, 2023

@ArturT just documenting our private chat here:

I found issues while running tests in Queue Mode.

This is unrelated to the changes introduced in this PR, and will be dealt separately. Also, the test fails because raw_now is not available anymore in the gem (this PR removed it).

@3v0k4 3v0k4 self-assigned this Nov 27, 2023
@3v0k4 3v0k4 force-pushed the rspec-time-tracker branch from 91a22c3 to 03a1b78 Compare November 28, 2023 13:24
@3v0k4 3v0k4 force-pushed the rspec-time-tracker branch from 03a1b78 to ff4a774 Compare November 28, 2023 13:42
@3v0k4 3v0k4 force-pushed the rspec-time-tracker branch from ff4a774 to 246ac3e Compare November 28, 2023 14:00
@3v0k4 3v0k4 marked this pull request as ready for review November 28, 2023 15:07
@3v0k4 3v0k4 requested a review from ArturT November 28, 2023 15:07
@ArturT
Copy link
Copy Markdown
Member

ArturT commented Nov 28, 2023

When you use: bin/knapsack_pro_queue_rspec_record_first_run with the following content for Queue Mode.
RSpec split by examples is enabled.

RANDOM_CI_BUILD_ID=$(openssl rand -base64 32)
CI_BUILD_ID=${3:-$RANDOM_CI_BUILD_ID}
COMMIT_HASH=$(ruby -e "require 'securerandom'; puts SecureRandom.hex")
BRANCH_NAME=fake-branch

export EXTRA_TEST_FILES_DELAY=10 # seconds
export KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=true

KNAPSACK_PRO_ENDPOINT=http://api.knapsackpro.test:3000 \
  KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC=fec3c641a3c4d2e720fe1b6d9dd780bc \
  KNAPSACK_PRO_CI_NODE_BUILD_ID=$CI_BUILD_ID \
  KNAPSACK_PRO_COMMIT_HASH=${3:-$COMMIT_HASH} \
  KNAPSACK_PRO_BRANCH=$BRANCH_NAME \
  KNAPSACK_PRO_CI_NODE_TOTAL=${2:-2} \
  KNAPSACK_PRO_CI_NODE_INDEX=${1:-0} \
  bundle exec rake "knapsack_pro:queue:rspec[--format d]"

Run this with a new commit and a new CI build ID:

CI node 0 (start this command first):
bin/knapsack_pro_queue_rspec_record_first_run 0 2 commit-1 ci-build-id-1

It would detect a slow test spec/slow_shared_examples_spec.rb (assuming it was recorded before) and run:
spec/slow_shared_examples_spec.rb[1:2]

CI node 1:
bin/knapsack_pro_queue_rspec_record_first_run 1 2 commit-1 ci-build-id-1
It would run
spec/slow_shared_examples_spec.rb[1:1:1]

In the user dashboard both specs are recorded with their timing:

spec/slow_shared_examples_spec.rb[1:1:1] 12.54 seconds
spec/slow_shared_examples_spec.rb[1:2] 11.04 seconds

That's good and expected.

But when I use regular mode then only spec/slow_shared_examples_spec.rb is recorded. There is missing [1:2] and [1:1:1] id for test examples.

This can lead to a problem. When I retry CI node then spec/slow_shared_examples_spec.rb (the whole file is executed on both CI nodes. I expect test case [1:2] to be executed on CI node 0 and [1:1:1] to be executed on CI node 1). We should track rspec ids for test cases in Regular Mode like we do in Queue Mode.

Copy link
Copy Markdown
Member

@ArturT ArturT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@3v0k4 I added a few small comments and one bigger issue that should be a one liner fix.

Please let me know when it's done and I can do the last quick look before approval.

Very impressive work. I like it 🚀

Comment thread lib/knapsack_pro/adapters/rspec_adapter.rb
Comment thread lib/knapsack_pro/adapters/rspec_adapter.rb Outdated
Comment thread lib/knapsack_pro/formatters/fetch_time_tracker.rb Outdated
Comment thread lib/knapsack_pro/formatters/time_tracker.rb Outdated
Comment thread lib/knapsack_pro/formatters/time_tracker.rb Outdated
end

def rspec_split_by_test_example?(file)
return false unless KnapsackPro::Config::Env.queue_recording_enabled?
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return false unless KnapsackPro::Config::Env.queue_recording_enabled?

I think this line is not needed and it would solve the issue #229 (comment)

Comment thread lib/knapsack_pro/report.rb Outdated
Comment thread lib/knapsack_pro/report.rb Outdated
Comment thread CHANGELOG.md Outdated
@ArturT ArturT merged commit bd42d62 into master Nov 29, 2023
@ArturT ArturT deleted the rspec-time-tracker branch November 29, 2023 18:32
@ArturT ArturT changed the title [Rspec/Queue] Track execution times with formatter [Rspec] Track execution times with formatter Nov 29, 2023
@ArturT ArturT added the RSpec label Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants