Skip to content

Conversation

ckcollab
Copy link
Contributor

@ckcollab ckcollab commented Jan 1, 2017

Tested locally and seems to work! I'm going to run all results and make sure that works as well, will just take quite a while.

Resolves #85 and relates to riot/riot#1978 and riot/riot#2192

@PascalLeMerrer
Copy link

Thx for adding the benchmark for riot 3.
When trying to build and run it, I've got an error:

ERROR in ./src/app.html
    Module build failed: Error: Riot parser "js.babel" is not registered.
        at Object._req (/Users/pascallemerrer/Documents/Dev/projects/js-framework-benchmark/riot-v3.0.5/node_modules/riot-compiler/lib/parsers.js:110:13)
        at _compileJS (/Users/pascallemerrer/Documents/Dev/projects/js-framework-benchmark/riot-v3.0.5/node_modules/riot-compiler/lib/compiler.js:433:47)
        at getCode (/Users/pascallemerrer/Documents/Dev/projects/js-framework-benchmark/riot-v3.0.5/node_modules/riot-compiler/lib/compiler.js:780:10)
        at /Users/pascallemerrer/Documents/Dev/projects/js-framework-benchmark/riot-v3.0.5/node_modules/riot-compiler/lib/compiler.js:942:26
        at RegExp.[Symbol.replace] (native)
        at String.replace (native)
        at /Users/pascallemerrer/Documents/Dev/projects/js-framework-benchmark/riot-v3.0.5/node_modules/riot-compiler/lib/compiler.js:940:23
        at RegExp.[Symbol.replace] (native)
        at String.replace (native)
        at Object.compile (/Users/pascallemerrer/Documents/Dev/projects/js-framework-benchmark/riot-v3.0.5/node_modules/riot-compiler/lib/compiler.js:905:6)
        at Object.module.exports (/Users/pascallemerrer/Documents/Dev/projects/js-framework-benchmark/riot-v3.0.5/node_modules/tag-loader/index.js:6:51)
     @ ./src/main.es6.js 11:0-21

The steps I followed are:

cd riot-v3.0.5
npm install
npm run build-prod

// we need to replace the id of this DOM element
// riot automatically bind ids to the tags scopes but 'update' is a read only property
// that's a quick way to replace the id in order to fit the bench specs
this._update.setAttribute('id', 'update')
Copy link
Contributor

Choose a reason for hiding this comment

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

this is no longer needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

{
test: /\.html$/, loader: 'tag',
query: {
type: 'babel'
Copy link
Contributor

Choose a reason for hiding this comment

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

change babel to es6

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

this.rows = store.data
this.selected = store.selected

this.one('mount', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this listener

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@ckcollab
Copy link
Contributor Author

ckcollab commented Jan 9, 2017

Thx for adding the benchmark for riot 3.

@PascalLeMerrer no problem, my pleasure! The change from babel -> es6 seems to have fixed this, pushed the change.

</button>
</div>
<div class='col-sm-6 smallpad'>
<button type='button' class='btn btn-primary btn-block' id='_update' onclick={ methods.update }>Update every 10th row
Copy link
Contributor

Choose a reason for hiding this comment

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

change _update with update

Copy link
Contributor Author

Choose a reason for hiding this comment

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

_updated ;)

@PascalLeMerrer
Copy link

@ckcollab It's still broken, by another error:

TypeError: _riot2.default is undefined (main.js:75:2)

@ckcollab
Copy link
Contributor Author

@PascalLeMerrer hmm, this is what I get running the command you mentioned previously:

image

@PascalLeMerrer
Copy link

PascalLeMerrer commented Jan 10, 2017

Sorry, I was not clear. The build works indeed, this error occurs later, when I try to run the benchmark in a web browser.

Steps to reproduce:

It should display the test runner, instead I've got a blank page and the error message in the console.

By the way, the page at http://127.0.0.1 misses a link to the test of Riot 3.0.5

GianlucaGuarini added a commit to riot/riot that referenced this pull request Jan 10, 2017
@GianlucaGuarini
Copy link
Contributor

@PascalLeMerrer @ckcollab hold on merging this. I will make a new patch release to fix the interop export issues soon

@ckcollab
Copy link
Contributor Author

@PascalLeMerrer added link from main page to riot 3.0.5, thanks for pointing that out.

Can't wait to see what @GianlucaGuarini is cookin up 👍

@GianlucaGuarini
Copy link
Contributor

@PascalLeMerrer you can now update and merge it should be fine

@ckcollab ckcollab changed the title Adds riot-v3.0.5 Adds riot-v3.0.7 Jan 10, 2017
@PascalLeMerrer
Copy link

@ckcollab did you run the tests?

@ckcollab
Copy link
Contributor Author

@PascalLeMerrer Yeah I get errors now, may have changed something unintentionally but does not seem to be working any more:

$ npm run selenium -- --framework riot-v3

> webdriver-ts@1.0.0 selenium /Users/eric/src/js-framework-benchmark/webdriver-ts
> node dist/benchmarkRunner.js "--framework" "riot-v3"

{ _: 
   [ '/usr/local/bin/node',
     '/Users/eric/src/js-framework-benchmark/webdriver-ts/dist/benchmarkRunner.js' ],
  help: false,
  framework: [ 'riot-v3' ],
  check: 'false',
  '$0': 'dist/benchmarkRunner.js' }
target directory results
Frameworks that will be benchmarked [ { name: 'riot-v3.0.7', uri: 'riot-v3.0.7', useShadowRoot: false } ]
Benchmarks that will be run [ '01_run1k',
  '02_replace1k',
  '03_update10th1k',
  '04_select1k',
  '05_swap1k',
  '06_remove-one-1k',
  '07_create10k',
  '08_create1k-after10k',
  '09_clear10k',
  '10_clear-2nd-time10k',
  '21_ready-memory',
  '22_run-memory' ]
benchmarking  { name: 'riot-v3.0.7', uri: 'riot-v3.0.7', useShadowRoot: false } 01_run1k
(node:9484) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
after initialized  01_run1k 0 riot-v3.0.7
retry failed
retry failed
retry failed
retry failed
retry failed
retry failed
QUIT

/Users/eric/src/js-framework-benchmark/webdriver-ts/node_modules/selenium-webdriver/lib/promise.js:654
    throw error;
    ^
Retrying failed

@PascalLeMerrer
Copy link

I have the exact same issue, whatever the test I run is (not limited to riot-v3)

@krausest krausest merged commit 69f3746 into krausest:master Jan 13, 2017
@krausest
Copy link
Owner

Thanks for your work. Runs fine on my machine. Riot 3.0.7 performs much better than 2.6.7 in this benchmark:
bildschirmfoto 2017-01-13 um 18 57 20
@PascalLeMerrer @ckcollab
Did you run "npm start" in the project root and start selenium in a different shell (the http-server must be running)? Can you open riot in the browser (http://localhost:8080/riot-v3.0.7/)?

@PascalLeMerrer
Copy link

@krausest: yes I did.
And I also set the LANG environment variable as I'm OSX in a non english version

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.

4 participants