Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion knapsack_rspec_report.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"spec/presenters/setup_presenter_spec.rb": 0.05804999999963911,
"spec/features/remember_device/session_expiration_spec.rb": 5.3716609999974025,
"spec/requests/redirects_spec.rb": 0.12476699999388075,
"spec/lib/feature_management_spec.rb": 158.021550999998,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I couldn't figure out how to regenerate the weight for this... so figured it was just easier to remove 😬

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

KNAPSACK_GENERATE_REPORT=true rspec is the way I've done in the past, but that's for all tests, and it takes a very long time to run.

You could generate it for the one file and merge the resulting report into the original file, but I'm not sure if that weight would be accurate on its own without anything to compare it to (unsure if the number is an absolute weight or a relative weight, and unsure if it varies from computer to computer).

KNAPSACK_GENERATE_REPORT=true rspec spec/lib/feature_management_spec.rb

This is what I got when doing that:

Suggested change
"spec/lib/feature_management_spec.rb": 158.021550999998,
"spec/lib/feature_management_spec.rb": 0.27332799999567214,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe I typo'd the env variable, but it didn't write that file for me. Anyways this is great, thanks!

And I'm almost certain the values in here are a number of seconds, so they're essentially absolute weights

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe I typo'd the env variable, but it didn't write that file for me.

I was having a similar issue, and in my case it was the difference between using KNAPSACK_GENERATE_REPORT=1 and KNAPSACK_GENERATE_REPORT=true. Not sure if that helps in your case.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated in 3a0712b

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And I'm almost certain the values in here are a number of seconds

Yep, it's seconds

"spec/forms/idv/doc_pii_form_spec.rb": 0.023514000000432134,
"spec/controllers/users/personal_keys_controller_spec.rb": 0.22581699999864213,
"spec/services/encryption/uak_password_verifier_spec.rb": 0.21799900000041816,
Expand All @@ -45,6 +44,7 @@
"spec/forms/idv/ssn_form_spec.rb": 0.1248829999967711,
"spec/components/vendor_outage_alert_component_spec.rb": 0.034957999996549916,
"spec/views/idv/phone/new.html.erb_spec.rb": 0.06148799999937182,
"spec/lib/feature_management_spec.rb": 0.27332799999567214,
"spec/lib/identity_job_log_subscriber_spec.rb": 0.16019000000233063,
"spec/forms/gpo_verify_form_spec.rb": 0.25047999999515014,
"spec/services/push_notification/email_changed_event_spec.rb": 0.022557999996934086,
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/feature_management_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'rails_helper'

describe 'FeatureManagement', type: :feature do
describe 'FeatureManagement' do
describe '#prefill_otp_codes?' do
context 'when SMS sending is disabled' do
before { allow(FeatureManagement).to receive(:telephony_test_adapter?).and_return(true) }
Expand Down