Skip to content

Commit 0c50e4f

Browse files
committed
Use different logs logs
1 parent d9a1159 commit 0c50e4f

File tree

6 files changed

+18
-7
lines changed

6 files changed

+18
-7
lines changed

benchmark/sirun/initialize/meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"variants": {
88
"main": {
99
"run": "node ./init.js",
10-
"run_with_affinity": "bash -c \"echo $CPU_AFFINITY && taskset -c $CPU_AFFINITY node ./init.js\""
10+
"run_with_affinity2": "bash -c \"echo taskset -c $CPU_AFFINITY node ./init.js\"",
11+
"run_with_affinity": "bash -c \"echo initialize\""
1112
}
1213
}
1314
}

benchmark/sirun/rewrite/meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"iast+orchestrion": {
99
"setup": "bash -c \"nohup node server.js > /dev/null 2>&1 &\"",
1010
"run": "node client.js",
11-
"run_with_affinity": "bash -c \"taskset -c $CPU_AFFINITY node client.js\""
11+
"run_with_affinity2": "bash -c \"echo taskset -c $CPU_AFFINITY node client.js\"",
12+
"run_with_affinity": "bash -c \"echo iastorchestrion\""
1213
}
1314
}
1415
}

benchmark/sirun/run-one-variant.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44

55
const { exec, stdio } = require('./run-util')
66

7-
exec('sirun', ['meta-temp.json'], { env: process.env, stdio })
7+
const env = Object.assign({}, process.env)
8+
9+
exec('sirun', ['meta-temp.json'], { env, stdio })

benchmark/sirun/run-util.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ const readline = require('readline')
66
function exec (...args) {
77
return new Promise((resolve, reject) => {
88
const proc = childProcess.spawn(...args)
9-
streamAddVersion(proc.stdout)
9+
// streamAddVersion(proc.stdout)
1010
proc.on('error', (e) => {
11+
console.log('error', e)
1112
reject(e)
1213
})
1314
proc.on('exit', (code) => {
@@ -37,6 +38,6 @@ function streamAddVersion (input) {
3738

3839
module.exports = {
3940
exec,
40-
stdio: ['inherit', 'pipe', 'inherit'],
41+
stdio: [0, 1, 1], //['inherit', 'pipe', 'inherit'],
4142
streamAddVersion
4243
}

benchmark/sirun/runall.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ for ((i=0; i<TOTAL_CPU_CORES; i++)); do
2828
done
2929

3030

31+
echo "CPU_START_ID: ${CPU_START_ID}"
3132
CPU_AFFINITY_BASE="${CPU_START_ID:-$TOTAL_CPU_CORES}" # Benchmarking Platform convention
3233

3334
MAJOR_VERSION=${MAJOR_VERSION:-22} # provided by each benchmark stage
@@ -57,12 +58,15 @@ run_benchmark() {
5758
local cpu_id=$3
5859

5960
cd "${dir}"
61+
echo cd "${dir}"
6062

6163
export CPU_AFFINITY=$((CPU_AFFINITY_BASE + cpu_id))
6264
echo "running ${dir}/${variant} in background, pinned to core ${CPU_AFFINITY}..."
6365

6466
export SIRUN_VARIANT=$variant
67+
sleep $((RANDOM % 10))
6568
(time node ../run-one-variant.js >> ../results.ndjson && echo "${D}/${V} finished.")
69+
6670
cd ..
6771

6872
echo "1" > "core_${cpu_id}.lock_core"

benchmark/sirun/strip-unwanted-results.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ const path = require('path')
66
const IGNORE_STATS = [
77
'system.time'
88
]
9-
10-
const lines = fs
9+
const fileContent = fs
1110
.readFileSync(path.join(__dirname, 'results.ndjson'))
1211
.toString()
1312
.trim()
13+
console.log('results.ndjson', fileContent)
14+
15+
const lines = fileContent
1416
.split('\n')
1517

1618
if (lines.length === 1 && lines[0] === '') {

0 commit comments

Comments
 (0)