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

Reworked JS runner #137

Closed
liclac opened this issue Mar 6, 2017 · 2 comments
Closed

Reworked JS runner #137

liclac opened this issue Mar 6, 2017 · 2 comments

Comments

@liclac
Copy link
Contributor

liclac commented Mar 6, 2017

I have a couple of design goals for this:

  • Based on goja, which gives us better optimization options than otto.
  • Remove the confusing Runtime/Runner distinction.
  • Split the monolithic API object, it should in itself deal only with core behavior such as groups and checks, everything else should be in subpackages and registered with a module registry.
  • You should be able to PR new modules with only a single-line modification to the js package, and everything else self-contained.

I'm doing some preliminary work on this right now, putting this out here for discussion.

@diego-plan9
Copy link

Once the reworked JS runner is in place, would one of the side effects be that goja would completely replace otto in k6, or would otto still be a dependency?

I'm asking from the point of view of planning the debian packaging - neither of them are on the repositories and would need to be packaged, and if otto is to be removed in the future (whenever that future is!) it would help me with prioritizing the tasks involved.

@liclac
Copy link
Contributor Author

liclac commented Mar 20, 2017

Yeah! Using goja is way faster for what we're using it for, so I want to move everything to it. ES6 compilation is already on goja (as otto's regex implementation couldn't run Babel), the remaining bits of otto code are the JS runner and thresholds.

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

No branches or pull requests

2 participants