angular / benchpress

159 stars 26 forks source link

does not work when using with new `traceur-runtime.js` #21

Closed tbosch closed 9 years ago

tbosch commented 9 years ago

Benchpress includes di.js which includes traceur-runtime.js in version 0.0.25. However, Angular2 is using traceur 0.0.74, and the two traceur-runtime.js are not compatible either way (code generated for the on does not run with the other).

I think we should either get rid of traceur-runtime within bp.js, or implement the frame approach, i.e. there won't be a bp.js in the application under test, only in the parent frame.

jeffbcross commented 9 years ago

Thanks, will look into this.

jeffbcross commented 9 years ago

Getting rid of traceur-runtime would be nice since it's more bytes, and since it's adding junk to the global object. Perhaps it's worth building a simplified DI for benchpress.

The auto-running context (ie benchmark runs in its own window or iframe) doesn't automatically solve the problem, because there still needs to be a runner present with the benchmark, to actually execute the code, time the tests, collect results, dispatch result events, etc.

I opened #24 with a proposal to properly address this issue, without giving up on DI altogether. In the meantime, I'll merge a fix that renames the $traceurRuntime and System globals during the build process so that they don't collide.

jeffbcross commented 9 years ago

Published to npm @0.2.2