<commit_before>/**
 * @namespace VENT.performance
 */

VENT.performance = (function() {

    var _last, _delta, _fps, _elapsed, _dom;

    _last = new Date();
    _delta = 0;
    _elapsed = 0;
    _fps = 0;

    function _init(domId) {
        if (domId) {
            _dom = document.getElementById(domId);
        }
        VENT.renderer.registerRender(_update);

    }

    function _update() {
        var _newDate = new Date();
        _delta = (_newDate - _last) / 1000;
        _elapsed += _delta;
        _last = _newDate;
        _fps = Math.floor(1/_delta);
        if (_dom) {
            _dom.innerHTML = _fps;
        }
    }

    function _getDelta() {
        return _delta;
    }

    return {
        init: _init,
        delta: _getDelta
    }

}());<commit_msg>Added "getElapsed" function to return the elapsed time in seconds.<commit_after>/**
 * @namespace VENT.performance
 */

VENT.performance = (function() {

    var _last, _delta, _fps, _elapsed, _dom;

    _last = new Date();
    _delta = 0;
    _elapsed = 0;
    _fps = 0;

    function _init(domId) {
        if (domId) {
            _dom = document.getElementById(domId);
        }
        VENT.renderer.registerRender(_update);

    }

    function _update() {
        var _newDate = new Date();
        _delta = (_newDate - _last) / 1000;
        _elapsed += _delta;
        _last = _newDate;
        _fps = Math.floor(1/_delta);
        if (_dom) {
            _dom.innerHTML = _fps;
        }
    }

    function _getDelta() {
        return _delta;
    }

    function _getElapsed() {
        return _elapsed;
    }

    return {
        init: _init,
        delta: _getDelta,
        elapsed: _getElapsed
    }

}());
{'fraction_non_alphanumeric': 0.11971830985915492, 'fraction_numerical': 0.009389671361502348, 'mean_word_length': 1.75, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6577006', 'n_tokens_mistral': 595, 'n_tokens_neox': 558, 'n_words': 127}