Skip to content

Commit

Permalink
update analyse
Browse files Browse the repository at this point in the history
  • Loading branch information
sigrdrifa committed Dec 22, 2023
1 parent eac11b3 commit 7345cc6
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 39 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ cabal.project.local~
.HTF/
.ghc.environment.*
*_enc.wav
*.tix

test/output/*.wav
test/output/*.png
Expand Down
8 changes: 4 additions & 4 deletions test-benchmark/Benchmark.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ import Test.Tasty.Bench

runEncodeCmd inputFile outputFile secret seconds = do
let encodeCmd = Encode secret seconds inputFile outputFile
interpretCmd encodeCmd
interpretCmd encodeCmd False

runEncodeStreamCmd inputFile outputFile secret seconds = do
let encodeCmd = EncodeStream secret seconds inputFile outputFile
interpretCmd encodeCmd
interpretCmd encodeCmd False

runDecodeCmd inputFile secret seconds = do
let decodeCmd = Decode secret seconds inputFile
interpretCmd decodeCmd
interpretCmd decodeCmd False

runDecodeStreamCmd inputFile secret seconds = do
let decodeCmd = DecodeStream secret seconds inputFile
interpretCmd decodeCmd
interpretCmd decodeCmd False

testSecret :: String
testSecret = "125@#1!12asde!3214[12345%¤¤21qassdf==:?213!3324124]"
Expand Down
2 changes: 1 addition & 1 deletion test/analyse/analyseSpectrograms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ for file in *.png
do
outfile="${file%.*}_out.png"
resultFile="${file%.*}_out_compare.png"
composite -verbose "$file" "$outfile" -compose difference "$resultFile"
magick compare -verbose -metric mse "$file" "$outfile" "$resultFile"
done
Empty file removed test/output/bench_result.svg
Empty file.
17 changes: 12 additions & 5 deletions test/output/bench_results.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Name,Mean (ps),2*Stdev (ps),Allocated,Copied,Peak Memory
All.EncodeCmd.encode sample1,318111219500,6990623790,1258525353,141856957,143654912
All.EncodeCmd.encode sample2,4407463904150,143391365434,13929923142,2211267081,1310720000
All.EncodeCmd.encode sample3,572628198100,6642108892,2053406813,273688018,1310720000
All.EncodeCmd.encode sample4,109747114100,4031779484,480339321,29124559,1310720000
All.EncodeCmd.encode sample5,1743358078200,148795886058,5431486104,881808831,1310720000
All.EncodeStreamCmd.encodestream sample1,14050117425,1320470924,96495148,8097,39845888
All.EncodeStreamCmd.encodestream sample2,161177700600,12249930804,1066582038,49570,39845888
All.EncodeStreamCmd.encodestream sample3,24811749500,2189379996,157872640,8696,39845888
All.EncodeStreamCmd.encodestream sample4,6087418962,363998660,37260313,3433,39845888
All.EncodeStreamCmd.encodestream sample5,67792375400,5482468386,420597783,21410,39845888
All.EncodeStreamCmd.encodestream sample6,858508801200,24538299618,5628987830,205651,39845888
All.DecodeStreamCmd.decodestream sample1,417897972,31313612,1939003,73,78643200
All.DecodeStreamCmd.decodestream sample2,4526903943,219868846,20694959,831,78643200
All.DecodeStreamCmd.decodestream sample3,671536304,43871828,3030313,126,78643200
All.DecodeStreamCmd.decodestream sample4,176428925,10467510,738419,28,78643200
All.DecodeStreamCmd.decodestream sample5,1689765059,119606338,8067974,300,78643200
All.DecodeStreamCmd.decodestream sample6,22366445125,1546938658,109624925,3939,78643200
127 changes: 98 additions & 29 deletions test/output/bench_results.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7345cc6

Please sign in to comment.