UNPKG
@dapplion/benchmark
Version:
latest (1.0.0)
1.0.0
0.2.6-rc.2
0.2.6-rc.1
0.2.6-rc.0
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.6
0.1.5
0.1.4
0.1.2
0.1.1
0.1.0
Ensures that new code does not introduce performance regressions with CI. Tracks:
@dapplion/benchmark
/
lib
/
esm
/
utils
/
shell.js
8 lines
(7 loc)
•
222 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
import
util
from
"node:util"
;
import
child
from
"node:child_process"
;
const
exec = util.
promisify
(child.
exec
);
export
async
function
shell
(
cmd
) {
const
{ stdout } =
await
exec
(cmd);
return
(stdout ||
""
).
trim
(); }