Skip to content

Commit

Permalink
Use a single sed to make replacements in regression script
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmengels committed Sep 11, 2024
1 parent 1e1ae7e commit 76756fb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions find-regressions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@

cd find-regressions/current
elm make --optimize ../src/ParseMain.elm --output elm.js > /dev/null
sed -i 's/$author$project$ParseMain$timeStart(version)/globalThis.performance.now()/' elm.js
sed -i 's/$author$project$ParseMain$timeEnd(version)/globalThis.measurements[version].push(globalThis.performance.now() - start)/' elm.js
sed -e 's/$author$project$ParseMain$timeStart(version)/globalThis.performance.now()/' \
-e 's/$author$project$ParseMain$timeEnd(version)/globalThis.measurements[version].push(globalThis.performance.now() - start)/' \
-i elm.js

cd ../..
cd find-regressions/published
elm make --optimize ../src/ParseMain.elm --output elm.js > /dev/null
sed -i 's/$author$project$ParseMain$timeStart(version)/globalThis.performance.now()/' elm.js
sed -i 's/$author$project$ParseMain$timeEnd(version)/globalThis.measurements[version].push(globalThis.performance.now() - start)/' elm.js
sed -e 's/$author$project$ParseMain$timeStart(version)/globalThis.performance.now()/' \
-e 's/$author$project$ParseMain$timeEnd(version)/globalThis.measurements[version].push(globalThis.performance.now() - start)/' \
-i elm.js

cd ../..
node find-regressions $@

0 comments on commit 76756fb

Please sign in to comment.