File tree Expand file tree Collapse file tree 5 files changed +24
-10
lines changed Expand file tree Collapse file tree 5 files changed +24
-10
lines changed Original file line number Diff line number Diff line change
1
+ language : node_js
2
+ sudo : false
3
+ node_js : " 5"
4
+ os :
5
+ - linux
6
+
7
+ # blacklist
8
+ branches :
9
+ except :
10
+ - gh-pages
11
+
12
+ install :
13
+ - node --version
14
+ - npm install
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ function printSystemInfo() {
42
42
writeLog ( ' - V8: ' + process . versions . v8 ) ;
43
43
writeLog ( ) ;
44
44
writeLog ( '## Shell Information:' ) ;
45
- writeLog ( ' - name: `' + exec ( 'bash -c \'echo ${SHELL}\'' , { silent : true } ) . stdout + '`' ) ;
45
+ writeLog ( ' - name: `' + exec ( 'bash -c \'echo ${SHELL}\'' , { silent : true } ) . stdout . trim ( ) + '`' ) ;
46
46
writeLog ( ' - version: ' + exec ( 'bash --version' , { silent : true } ) . stdout . replace ( / \n + / g, '\n' ) ) ;
47
47
}
48
48
@@ -76,13 +76,13 @@ ls().forEach(function (dir) {
76
76
config . silent = true ;
77
77
78
78
start_time = new Date ( ) . getTime ( ) ;
79
- js_output = exec ( 'node ' + jsfile ) . output ;
79
+ js_output = exec ( 'node ' + jsfile ) . stdout ;
80
80
end_time = new Date ( ) . getTime ( ) ;
81
81
js_time = end_time - start_time ;
82
82
writeLog ( ' - [ShellJS] took `' + js_time + '` milliseconds' , prefix + '/' + jsfile ) ;
83
83
84
84
start_time = new Date ( ) . getTime ( ) ;
85
- shell_output = exec ( 'bash ' + shfile ) . output ;
85
+ shell_output = exec ( 'bash ' + shfile ) . stdout ;
86
86
end_time = new Date ( ) . getTime ( ) ;
87
87
shell_time = end_time - start_time ;
88
88
writeLog ( ' - [Bash] took `' + shell_time + '` milliseconds' , prefix + '/' + shfile ) ;
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " jsbench " ,
2
+ "name" : " shelljsbenchmarks " ,
3
3
"version" : " 0.0.1" ,
4
4
"description" : " Benchmark ShellJS scripts" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
7
- "test" : " echo \" Error: no test specified \" && exit 1 "
7
+ "test" : " node benchmark.js "
8
8
},
9
9
"repository" : {
10
10
"type" : " git" ,
11
- "url" : " git+https://github.com/IvantheDugtrio/ShellJSBench .git"
11
+ "url" : " git+https://github.com/shelljs/benchmarks .git"
12
12
},
13
13
"keywords" : [
14
14
" ShellJS" ,
18
18
"author" : " " ,
19
19
"license" : " MIT" ,
20
20
"bugs" : {
21
- "url" : " https://github.com/IvantheDugtrio/ShellJSBench /issues"
21
+ "url" : " https://github.com/shelljs/benchmarks /issues"
22
22
},
23
- "homepage" : " https://github.com/IvantheDugtrio/ShellJSBench #readme" ,
23
+ "homepage" : " https://github.com/shelljs/benchmarks #readme" ,
24
24
"bin" : {
25
25
"benchmark" : " ./benchmark.js"
26
26
},
Original file line number Diff line number Diff line change 1
1
require ( 'shelljs/global' ) ;
2
- for ( var k = 0 ; k < 100000 ; k ++ )
2
+ for ( var k = 0 ; k < 10000 ; k ++ )
3
3
echo ( env . PATH ) ;
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- for k in ` seq 100000 ` ; do
2
+ for k in ` seq 10000 ` ; do
3
3
echo " $PATH "
4
4
done
You can’t perform that action at this time.
0 commit comments