From e39e791727b9e65cb842f12fce814dedc4d2f677 Mon Sep 17 00:00:00 2001 From: Paliak <91493239+Paliak@users.noreply.github.com> Date: Tue, 2 Jul 2024 21:36:17 +0200 Subject: [PATCH] FIX: add runtime performance to artefact. less-than -> greater -> than --- .github/workflows/buildtest.yml | 3 ++- spec/DiffRuntime.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildtest.yml b/.github/workflows/buildtest.yml index a53e2f63f3..019a03f2fc 100644 --- a/.github/workflows/buildtest.yml +++ b/.github/workflows/buildtest.yml @@ -55,7 +55,8 @@ jobs: chmod -R 777 /tmp/cache && docker compose run -v '/tmp/cache/:/cache' -e 'CACHEDIR=/cache' busted-diff | tee /tmp/dockerlog - name: Generate artefact run: | - sed -n '/Savefile Diff for/, $p' /tmp/dockerlog | tee /tmp/artefact + sed -n '/Runtime comparison for/,/Savefile Diff for/{/Savefile Diff for/!p;}' /tmp/dockerlog > tee /tmp/artefact + sed -n '/Savefile Diff for/, $p' /tmp/dockerlog >> /tmp/artefact [ -s /tmp/artefact ] || rm /tmp/artefact - name: Upload artefact uses: actions/upload-artifact@v4 diff --git a/spec/DiffRuntime.lua b/spec/DiffRuntime.lua index 70bbc00c9c..9d6caf4e86 100644 --- a/spec/DiffRuntime.lua +++ b/spec/DiffRuntime.lua @@ -6,7 +6,7 @@ if headHnd and devHnd then local headRuntime = tonumber(headHnd:read("*a")) local devRuntime = tonumber(devHnd:read("*a")) local runtimeDifference = math.abs(headRuntime / devRuntime - 1) - if runtimeDifference <= 0.1 then + if runtimeDifference >= 0.1 then print(string.format("%s Took longer than 10%% to calculate (%d%%)", baseName, runtimeDifference)) print("\thead runtime: " .. headRuntime .. "ms") print("\tdev Output: " .. devRuntime .. "ms")