<commit_before>'use strict';

var Fs = require('fs');

/**
 * @class MyServer
 * @extends Server
 * */
var MyServer = /** @type Server */ require('../../Framework').extend({
    //  Не триггерить события во время бенчмарка
    // для чистоты эксперимета
    emit: function () {}
});

var app = new MyServer();
var sock = 'benchmark/framework.sock';
var Http = require('http');
var path = require('../lib/path');

app.decl('_', ['a'], function (track) {
    track.send();
});

app.decl('a', ['b'], function (track, errors, result, done) {
    done(null, 'a');
});

app.decl('b', [], function (track, errors, result, done) {
    done(null, 'b');
});

app.route('GET', '/page/<pageName>/', '_');

/*eslint no-sync: 0*/
try {
    Fs.unlinkSync(sock);
} catch (ex) {}

Http.createServer(app.getHandler()).listen(sock);

module.exports = function (done) {
    Http.request({
        method: 'GET',
        socketPath: sock,
        path: path
    }, done).end();
};<commit_msg>master: fix benchmark<commit_after>'use strict';

var Fs = require('fs');

/**
 * @class MyServer
 * @extends Server
 * */
var MyServer = /** @type Server */ require('../../Framework').extend({
    //  Не триггерить события во время бенчмарка
    // для чистоты эксперимета
    emit: function () {}
});

var app = new MyServer();
var sock = 'benchmark/framework.sock';
var Http = require('http');
var path = require('../lib/path');

app.decl('_', ['a'], function (track) {
    track.send();
});

app.decl('a', ['b'], function (track, errors, result, done) {
    done(null, 'a');
});

app.decl('b', [], function (track, errors, result, done) {
    done(null, 'b');
});

app.route('GET', '/page/<pageName>/', '_');

/*eslint no-sync: 0*/
try {
    Fs.unlinkSync(sock);
} catch (ex) {}

app.ready();
Http.createServer(app.getHandler()).listen(sock);

module.exports = function (done) {
    Http.request({
        method: 'GET',
        socketPath: sock,
        path: path
    }, done).end();
};
{'fraction_non_alphanumeric': 0.2215995924605196, 'fraction_numerical': 0.0010188487009679063, 'mean_word_length': 3.297592997811816, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1856699', 'n_tokens_mistral': 688, 'n_tokens_neox': 696, 'n_words': 165}