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

feature(jest-runner): Pass the active mutant id through the env vars rather than config #2416

Merged

Conversation

Garethp
Copy link
Contributor

@Garethp Garethp commented Aug 24, 2020

This represents a rather massive difference in speed on our project. I can get propper numbers tomorrow, but from a quick look it's somewhere between 2x-4x at least.

It looks like the integration tests for jest-runner are failing. I'm not sure if it's because I missed something, or the integration tests missed something. It looks like the integration mutants aren't picking up the mutant id from the environment variables


var __global_69fa48 = (function(g){
if (g.__activeMutant__ === undefined && g.process && g.process.env && g.process.env.__STRYKER_ACTIVE_MUTANT__) {
g.__activeMutant__ = Number(g.process.env.__STRYKER_ACTIVE_MUTANT__);
Copy link
Member

Choose a reason for hiding this comment

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

This was the issue. As you can see, the process.env variable name was out-dated here (__ACTIVE_MUTANT__ -> __STRYKER_ACTIVE_MUTANT__).

The code here was instrumented with an older version of the instrumenter.

@nicojs nicojs merged commit cad01ba into stryker-mutator:epic/mutation-switching Aug 28, 2020
@nicojs
Copy link
Member

nicojs commented Aug 29, 2020

@Garethp I've just released v4.0.0-beta.4. I'm very curious if this yields a performance improvement.

If you want to help further with the improvement of your use case (Jest/react), feel free to help us by finding a project we can use for our performance testing efforts. See also #2434

@Garethp
Copy link
Contributor Author

Garethp commented Aug 30, 2020

@nicojs Beta 4 does bring some really great performance improvements, thanks! The memory leak that I've noticed is still dragging down performance, but if I patch that out by restarting the process every 20 runs the performance improvement is easily 6x or more than compared to Beta 3.

I'll look into bringing a project to you for use of real world testing

@Garethp
Copy link
Contributor Author

Garethp commented Aug 30, 2020

Well, I spent all day, but I found out Jest just appears to be leaking for no reason at all. I've logged a bug report

@nicojs
Copy link
Member

nicojs commented Aug 31, 2020

That's very interesting! I will do some checks as well and report my findings there.

I've got a feeling that there should be a way to prevent memory leaks in Jest. Maybe some sort of cleanup we can call between test runs? Will have to investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants