--- a/RegressionTests__CRCTests.st Sat Mar 23 11:47:49 2019 +0100
+++ b/RegressionTests__CRCTests.st Sat Mar 23 14:41:23 2019 +0100
@@ -105,55 +105,49 @@
!
test99_speed
- |speedTest|
+ |oneTest speedTest|
self skipIf:true description:'speedtest; not part of automated test suite'.
- speedTest := [:name :crcStream :n :s |
+ oneTest := [:name :hashStream :n :s |
|l t nMb|
l := s size.
t := Time millisecondsToRun:[
n timesRepeat:[
- crcStream nextPutAll:s
+ hashStream nextPutAll:s
].
].
t := (t / 1000) asFloat.
nMb := n*l/1024/1024.
- Transcript showCR:'%1: %2 (chunk size %3)' with:name with:(crcStream hashValue hexPrintString) with:l.
+ Transcript showCR:'%1: %2 (chunk size %3)' with:name with:(hashStream hashValue hexPrintString) with:l.
Transcript showCR:' %1 seconds for %2 Mb' with:t with:(nMb asFixedPoint:2).
Transcript showCR:' %1 Mb/s' with:((nMb / t) asFixedPoint:2).
].
- Transcript showCR:'-----------------------'.
- speedTest
- value:'crc32' value:CRC32Stream new value:2000000
- value:'1234567890'.
- speedTest
- value:'crc32' value:CRC32Stream new value:2000000
- value:'12345678901234567890123456789012345678901234567890'.
- speedTest
- value:'crc32' value:CRC32Stream new value:200000
- value:('12345678901234567890123456789012345678901234567890' ,* 20).
- speedTest
- value:'crc32' value:CRC32Stream new value:20000
- value:('12345678901234567890123456789012345678901234567890' ,* 1000).
+ speedTest := [:name :hashStreamMaker |
+ Transcript showCR:'-----------------------'.
+ oneTest
+ value:name value:(hashStreamMaker value) value:2000000
+ value:'1234567890'.
+ oneTest
+ value:name value:(hashStreamMaker value) value:2000000
+ value:'12345678901234567890123456789012345678901234567890'.
+ oneTest
+ value:name value:(hashStreamMaker value) value:200000
+ value:('12345678901234567890123456789012345678901234567890' ,* 20).
+ oneTest
+ value:name value:(hashStreamMaker value) value:20000
+ value:('12345678901234567890123456789012345678901234567890' ,* 1000).
+ ].
- Transcript showCR:'-----------------------'.
- speedTest
- value:'crc32 castagnoli' value:CRC32Stream newCastagnoli value:2000000
- value:'1234567890'.
speedTest
- value:'crc32 castagnoli' value:CRC32Stream newCastagnoli value:2000000
- value:'12345678901234567890123456789012345678901234567890'.
+ value:'crc32' value:[CRC32Stream new].
speedTest
- value:'crc32 castagnoli' value:CRC32Stream newCastagnoli value:200000
- value:('12345678901234567890123456789012345678901234567890' ,* 20).
- speedTest
- value:'crc32 castagnoli' value:CRC32Stream newCastagnoli value:20000
- value:('12345678901234567890123456789012345678901234567890' ,* 1000).
+ value:'crc32 castagnoli' value:[CRC32Stream newCastagnoli].
"Created: / 23-03-2019 / 09:53:58 / Claus Gittinger"
+ "Modified: / 23-03-2019 / 14:41:14 / Claus Gittinger"
! !
!CRCTests class methodsFor:'documentation'!