Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

perf: use test profile #942

Merged
merged 3 commits into from
Feb 12, 2019
Merged

perf: use test profile #942

merged 3 commits into from
Feb 12, 2019

Conversation

alanshaw
Copy link
Contributor

@alanshaw alanshaw commented Feb 11, 2019

Urh, this is kind of amazing, it took the node.js test time down from 13m49.208s to 5m15.992s 😱 (for me locally)

For reference, this is what using the "test" profile does: https://github.com/ipfs/go-ipfs-config/blob/master/profile.go#L68-L85

resolves #593

Depends on:

@ghost ghost assigned alanshaw Feb 11, 2019
@ghost ghost added the in progress label Feb 11, 2019
package.json Outdated
@@ -84,7 +84,7 @@
"eslint-plugin-react": "^7.11.1",
"go-ipfs-dep": "~0.4.18",
"interface-ipfs-core": "~0.96.0",
"ipfsd-ctl": "~0.40.0",
"ipfsd-ctl": "github:ipfs/js-ipfsd-ctl#feat/support-profile",
Copy link
Contributor

Choose a reason for hiding this comment

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

what's missing to have this shipped? :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing, I just didn't PR yet!

Copy link
Contributor

Choose a reason for hiding this comment

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

I actually missed what this “test profile” was in the beginning. Super rad to see this go-IPFS feature.

Would love to see this on interop tests (and see if it doesn’t break my router anymore).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should have explained better! For everyone else, you can pass a "profile" option to ipfs init:

'test' - Reduces external interference of IPFS daemon, this is useful when using the daemon in test environments.
https://docs.ipfs.io/reference/api/cli/#ipfs-init

Copy link
Contributor

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

Awesome test speed improvement! 💪

@Kubuxu
Copy link

Kubuxu commented Feb 11, 2019

@alanshaw could you also try: -p test,badgerds it uses different datastore that might make it even a bit faster.

@Kubuxu
Copy link

Kubuxu commented Feb 12, 2019

For reference posting what test does also here: https://github.com/ipfs/go-ipfs-config/blob/master/profile.go#L68-L85


EDIT: Upps, I didn't notice that you've added it to top comment after the call.

@alanshaw
Copy link
Contributor Author

I updated this PR to use the "test" profile in all tests (not just the interface-ipfs-core tests). npm run test:node now takes:

✨ 2m43.800s ✨

@Kubuxu, I think I might be doing something wrong - passing "test,badgerds" for the test profile makes it slow again - I'm guessing these aren't being applied the way I'm specifying them - do I need multiple -p params or should it just work with ipfs init -p test,badgerds?

@Kubuxu
Copy link

Kubuxu commented Feb 12, 2019

Checking it manually, they seem to be both applied when done in this way.
Maybe Badger has a flat overhead (but it scales better). Thanks for trying.'

2m43.800s

That is awesome.

@alanshaw
Copy link
Contributor Author

@Kubuxu thank you for the tip off :D

@alanshaw
Copy link
Contributor Author

alanshaw commented Feb 12, 2019

Seems to be taking between ✨ 3-4 mins ✨ in Jenkins CI https://ci.ipfs.team/blue/organizations/jenkins/IPFS%2Fjs-ipfs-http-client/detail/PR-942/6/pipeline/257

Alan Shaw added 3 commits February 12, 2019 21:51
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
@alanshaw alanshaw force-pushed the perf/use-test-profile branch from 184fe48 to 302a1b4 Compare February 12, 2019 21:51
@alanshaw alanshaw merged commit 2c90620 into master Feb 12, 2019
@ghost ghost removed the in progress label Feb 12, 2019
@alanshaw alanshaw deleted the perf/use-test-profile branch February 12, 2019 22:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Speeding up tests
4 participants