jsbench / jsbench.github.io Goto Github PK
View Code? Open in Web Editor NEWJavaScript benchmark playground
Home Page: http://jsbench.github.io/
License: MIT License
JavaScript benchmark playground
Home Page: http://jsbench.github.io/
License: MIT License
Под какой лицензией проект распространяется? Форкнуть то я форкну, но как я могу этим пользоваться, не понятно.
После тестов, когда прокручиваем страницу вручную, кнопка сролла не пропадает, что не логично. Поправить.
So there are a few issues with page layout on my Android phone. That in itself is easy to work around: I'm writing out the benchmarks on my laptop anyway, and just open the link in the Android browser to benchmark the JS.
However, when running the benchmarks the DOM is updated live. It turns out that the variation of the numbers triggers all kinds of weird resizing issues, and DOM reflow calculations are causing visible lag. I assume this happens between measurements and doesn't affect the benchmarking, but it's still a bit off-putting.
Maybe it would be better for mobile if it was possible to not change the webpage until all benchmarks have finished?
people not always have github account, I think it will be good idea if snippet allowed to save in URL hash if user not logged in, for example url:
https://jsbench.github.io/#snippet=WycvdGUvLnRlc3QoInRlc3QiKScsICcidGVzdCIubWF0Y2goL3RlLyknXQ==
will be
# snippet 1
/te/.test("test")
# snippet 2
"test".match(/te/)
WycvdGUvLnRlc3QoInRlc3QiKScsICcidGVzdCIubWF0Y2goL3RlLyknXQ==
=
['/te/.test("test")', '"test".match(/te/)']
Пытаясь открыть в IE11
http://jsbench.github.io/
ничего не грузиться - и получаю вот такую ошибку
Unable to get property 'nextSibling' of undefined or null reference
File: feast.min.js, Line: 14, Column: 9224 <-- unminifed
происходит это тут
function j(e, t) {
var n = t.tag;
if (n) {
t.dom = e;
var r, i;
switch (n) {
case "#":
r = e.nodeValue, i = r.indexOf(H), i !== -1 && (i + 1 < r.length && e.splitText(i + 1), e.nodeValue = r.substr(0, i));
break;
case "!":
break;
case "<":
var s = 0, o;
for (; e; e = e.nextSibling) {
s++;
if (e.nodeType === 3) {
r = e.nodeValue;
if (s > 1 && r === H) {
o = e.nextSibling, e.parentNode.removeChild(e), s--;
break;
}
i = r.indexOf(H);
if (i !== -1) {
i + 1 < r.length && e.splitText(i + 1), e.nodeValue = r.substr(0, i), o = e.nextSibling;
break;
}
}
}
return t.domLength = s, o;
default:
var u = t.children, a = G(u);
if (a > 1) {
u = t.children;
var f = e.firstChild;
for (var l = 0, c = u.length; l < c; l++)
f = j(f, u[l]);
} else if (a !== 0) {
var h = T(u, a);
m(h) ? h || (e.firstChild.nodeValue = "") : j(e.firstChild, h);
}
var p = t.events;
if (p) {
V(e, t, p);
var d = p.$created;
d && D(d, "$created", e, t);
}
}
return e.nextSibling; <- !!!!!! HERE !!!!!
}
return F(e, t);
}
Не могу исправить и сделать pullRequest ибо у feast нет github репозитория ( или просто я не смог найти )
Поэтому просто прошу поправить
Если в сниппете кода теста присутствует какое-либо действие в ответ на событие, например скролл окна, то в момент, когда тестируется данный сниппет и срабатывает данное событие (и, значит, исполняется js код), может быть выполнено тело обработчика данного события :)
Например:
window.onscroll = function(ev) {
alert(8);
document.getElementById('canvas').remove();
};
Это вредит правильной, стабильной логике работы программы и открывает потенциальные уязвимости ;)
@RubaXa В данном контексте можно что-либо предпринять?
Hey first of all wanted to say thanks for such an excellent tool! I love it and use it frequently.
Recently I needed to start testing async functions, but it doesn't look like there is an UI option to enable it.
Any chance this would be in the roadmap, or are you pretty much done supporting/building jsbench? (You've done a great job, and I want to thank you!)
We just ran a test evaluating var vs const, and the difference was 4300 ops/sec to 4320 ops/sec.
However the chart made it feel like there was a massive difference in the two.
Can the x axis start at 0 for better comparison of the results?
Сделать так, чтобы пользователи сервиса смогли видеть явные ошибки в коде своих сниппетов, если таковые имеются. Сейчас некоторые синтаксические ошибки отображаются в консоли во время исполнения теста сниппета, что не очень прозрачно для пользователей. А было бы здорово видеть, что с нашим кодом что-то не так.
Например, следующий код выплюнет Uncaught SyntaxError: Unexpected identifier
в консоль, но не пользователю:
b = {
a: 2
b: 3
}
Нужна поддержка RequireJS, чтобы в коде теста можно было написать
// Подключаем
var $ = require('https://code.jquery.com/jquery-2.1.4.min.js');
require('...')
на переменную подгруженного модуляAfter jsbench runs a test, a bouncing down-arrow appears (it's <div ref="scrollTo" class="app__scrollto" style=""></div>
). When clicked, the arrow scrolls you to the charts at the bottom.
However, if you re-run the test by clicking the "Run" button, without ever having clicked the down arrow, it reruns the test while the bouncing animation is still going. This can significantly skew test results in some cases, depending on what is being tested.
Было бы очень удобно иметь возможность перемещать тесты, для наглядности.
Sometimes I modify single test case and for the rest I have already run the benchmark. I would like to have possibility to run single test, without waiting for all others, which didn't change.
There is no setup block to setup a array and then test what works best for it.
Example: jsben.ch
Всё же надо сделать папку /bundles/
в которую будут складываться собранные js и css, да и другой хлам.
Это нужно затем, чтобы в редакторе (например WebStorm) можно было исключить эту папку, то сейчас моя IDE индексирует этот файл :[
It would be nice to be able to configure how many runs/how long of a duration to run each test case for.
Sometimes I want quick estimations of run-time for many different code snippets and the default test durations are too long; other times I want even more precise results than those given.
Perhaps it can be added as an option to the "Setup" panel -- or perhaps add a new "Settings" panel next to it, for this setting.
LICENSE
:)]CONTRIBUTING.md
Буду заносить сюда по мере нахождения, чтоб не забыть.
app.js
в utils.js
app.js
в отдельный модульcurrently, only the operation frequency is displayed in operations per second = hertz
to me, getting the operation time feels more natural
like code A needs 10 nanoseconds, code B needs 100 nanoseconds
(smaller is better)
its just more intuitive than comparing
100.000 ops/sec vs 10.000 ops/sec
(larger is better)
also, when you time different components of one larger program
you can easily summarize the time-values
ideally make this optional, so we can switch between time and frequency
maybe with a per-test preset config, stored in the github-gist
Hi, great project!
How about adding HTML to the setup, so we can source different libraries?
Выполнить следующие пункты для более интуитивного и непробиваемого UI (список продолжать по мере нахождения улучшения):
Run
, когда нет ни одного сниппетаUncaught TypeError: Cannot set property 'innerHTML' of undefined
overflow-y: scroll
для htm
Uncaught Error: Row {0} has {NUM} columns, but must have {NUM-1}
P.S. C графиками пока неоднозначно как поступить. Пока оставил. Может после тестирования, пришлёшь свои замечания, правки, комменты...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.