MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / getVersions

Function getVersions

benchmarks/report.mjs:216–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

214}
215
216function getVersions() {
217 const v = { node: process.version };
218 try { v.ceCurrent = JSON.parse(readFileSync(join(ROOT, 'package.json'), 'utf8')).version; } catch {}
219 try { v.ceCurrentSha = execFileSync('git', ['rev-parse', '--short', 'HEAD'], { cwd: ROOT, encoding: 'utf8' }).trim(); } catch {}
220 v.cePublished = PUBLISHED_VERSION;
221 try { v.python = execFileSync(PYTHON, ['--version'], { encoding: 'utf8' }).trim().replace('Python ', ''); } catch {}
222 try { v.sympy = execFileSync(PYTHON, ['-c', 'import sympy;print(sympy.__version__)'], { encoding: 'utf8' }).trim(); } catch {}
223 try { v.numpy = execFileSync(PYTHON, ['-c', 'import numpy;print(numpy.__version__)'], { encoding: 'utf8' }).trim(); } catch {}
224 try {
225 v.mathjs = execFileSync(NODE, ['--input-type=module', '-e',
226 `import * as m from '${join(__dirname, '.competitors', 'mathjs-host', 'node_modules', 'mathjs', 'lib', 'esm', 'index.js')}';process.stdout.write(m.version)`],
227 { encoding: 'utf8' }).trim();
228 } catch {}
229 // Wolfram Language kernel version ($VersionNumber side); one kernel launch.
230 try { v.wolfram = execFileSync('wolframscript', ['-code', '$Version'], { encoding: 'utf8' }).trim().replace(/\s*\(.*$/, ''); } catch {}
231 return v;
232}
233
234// The warm batch runner measures ALL THREE Compute Engine columns back-to-back
235// in ONE node process: `ce-current` (base CE, current bundle), `ce-pub` (base

Callers 1

report.mjsFile · 0.85

Calls 2

parseMethod · 0.65
replaceMethod · 0.65

Tested by

no test coverage detected