Giter Site home page Giter Site logo

jsbench.github.io's People

Contributors

nicksp avatar rubaxa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsbench.github.io's Issues

Лицензия

Под какой лицензией проект распространяется? Форкнуть то я форкну, но как я могу этим пользоваться, не понятно.

Request: option to not update the DOM while in the process of benchmarking

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?

Allow snippet to be saved in URL hash

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 - 'nextSibling' of undefined or null reference

Пытаясь открыть в 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 В данном контексте можно что-либо предпринять?

Async Support?

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!)

X axis should start at 0

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
}

Поддержка require('cdn/path/to/lib.js')

Нужна поддержка RequireJS, чтобы в коде теста можно было написать

// Подключаем
var $ = require('https://code.jquery.com/jquery-2.1.4.min.js');
  1. Распарсить такие выражения, подгрузить зависимости
  2. Заменить при выполнении бенчмарка require('...') на переменную подгруженного модуля

The bouncing down-arrow doesn't disappear during re-runs, skewing results

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.

Инфраструктура

  • JSHint / ESLint / JSCS - #4
  • Автофикс ofix по CodeStyle (JSCS, либо какой-нибудь инструмент, вроде fixmyjs)
  • ES6 + Модули
  • Grunt/Gulp/Webpack
  • Сборка проекта в единый bundle, разработка с использованием локального вебсервера (никаких watcher'ов, это слишком медленно)
  • Автоматическое формирование appcache манифеста
  • Запуск всего выше перечисленного по githooks (pre-commit, pre-push)

Feature - Running single test

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.

Setup block

There is no setup block to setup a array and then test what works best for it.
Example: jsben.ch

Перенести сборку в `/bundles/`

Всё же надо сделать папку /bundles/ в которую будут складываться собранные js и css, да и другой хлам.

Это нужно затем, чтобы в редакторе (например WebStorm) можно было исключить эту папку, то сейчас моя IDE индексирует этот файл :[

Configurable run count/duration for snippets

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 в отдельный модуль

show operation time / duration in nanoseconds

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

Adding html to setup

Hi, great project!

How about adding HTML to the setup, so we can source different libraries?

Полировка UX

Выполнить следующие пункты для более интуитивного и непробиваемого 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 графиками пока неоднозначно как поступить. Пока оставил. Может после тестирования, пришлёшь свои замечания, правки, комменты...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.