update regex for v4

This commit is contained in:
silas 2022-05-13 16:14:30 +01:00 committed by GitHub
parent 0ef86be7ea
commit 0155d1ddd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -103,15 +103,15 @@ jobs:
run: echo "::set-output name=today::$(date +'%Y-%m-%d')" run: echo "::set-output name=today::$(date +'%Y-%m-%d')"
- name: Process raw log - name: Process raw log
run: | run: |
rg -oNI "(Mango:|Instruction: |Program ${{ env.LOG_PROGRAM }} consumed).*$" raw-test-bpf.log \ rg -oNI "(Instruction: |Program ${{ env.LOG_PROGRAM }} consumed).*$" raw-test-bpf.log \
| rg -U 'Mango: .*\nProgram ${{ env.LOG_PROGRAM }}.*' \ | rg -U 'Instruction:.*\nProgram ${{ env.LOG_PROGRAM }}.*' \
| awk 'NR % 2 == 1 { o=$0 ; next } { print o " " $0 }' \ | awk 'NR % 2 == 1 { o=$0 ; next } { print o " " $0 }' \
| sort | uniq -u | sort > cu-per-ix.log | sort | uniq -u | sort > cu-per-ix.log
- name: Clean up log - name: Clean up log
run: | run: |
rg -N 'Mango: (\w+) .* consumed (\d+) .*' cu-per-ix.log -r '${{ steps.date.outputs.today }},${{ github.repository }},$1,$2' \ rg -N 'Instruction: (\w+) .* consumed (\d+) .*' cu-per-ix.log -r '${{ steps.date.outputs.today }},$1,$2' \
| uniq | xsv sort -s 3 -N -R \ | uniq | xsv sort -s 2 -N -R \
| sort -t ',' -k 3,4 -u \ | sort -t ',' -k 2,3 -u \
| sort > cu-per-ix-clean.log | sort > cu-per-ix-clean.log
- name: Save clean log - name: Save clean log
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3