Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API key is requested from shell output even when not needed #186

Open
schneems opened this issue Mar 18, 2021 · 0 comments
Open

API key is requested from shell output even when not needed #186

schneems opened this issue Mar 18, 2021 · 0 comments

Comments

@schneems
Copy link
Contributor

From this test https://github.com/heroku/heroku-buildpack-ruby-experimental/blob/d5e3b25361cf39cf8077a335017c8d38c5e69dfe/spec/unit/assets_precompile_spec.rb#L8-L33

We can see the bulk of time is spent getting the API token.

Even if it's just a few seconds, that creates a minimum cycle time for that test file.

schneems added a commit to heroku/buildpacks-ruby that referenced this issue Mar 18, 2021
Even when not using the Heroku token, Hatchet generates it heroku/hatchet#186. This change moves away from needing hatchet for this specific test.

Before

```
$ bundle exec rspec spec/unit/assets_precompile_spec.rb
...

Finished in 4.98 seconds (files took 0.43945 seconds to load)
3 examples, 0 failures
```

After

```

$ bundle exec rspec spec/unit/assets_precompile_spec.rb
...

Finished in 0.90038 seconds (files took 0.49621 seconds to load)
3 examples, 0 failures

```

I added stackprof to the project to help profile the individual test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant