Skip to content

Instantly share code, notes, and snippets.

@synopse
Created January 10, 2021 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save synopse/005068d5e4c88c55f48461dae1c3da96 to your computer and use it in GitHub Desktop.
Save synopse/005068d5e4c88c55f48461dae1c3da96 to your computer and use it in GitHub Desktop.
mORMot 1.18.6202 tests on Linux x86_64
Hint: (lazarus) [TMainIDE.DoRunProjectWithoutDebug] ExeCmdLine=""/home/ab/dev/lib/SQLite3/fpc/bin/x86_64-linux/TestSQL3""
Synopse mORMot Framework Automated tests
------------------------------------------
1. Synopse libraries
1.1. Low level common:
- System copy record: 162 assertions passed 26us
- TRawUTF8List: 190,172 assertions passed 67.69ms
- TDynArray: 1,092,814 assertions passed 150.29ms
- TDynArrayHashed: 1,599,067 assertions passed 910.74ms
- TSynDictionary: 139,850 assertions passed 369.26ms
- TSynQueue: 6,541,501 assertions passed 381.41ms
- TObjectListHashed: 2,996,100 assertions passed 2.36s
- TObjectListSorted: 79,874 assertions passed 104.01ms
- TSynNameValue: 40,032 assertions passed 11.97ms
- TRawUTF8Interning: 2,000,013 assertions passed 187.72ms
500000 interning 8 KB in 65.51ms i.e. 7,632,073/s, aver. 0us, 116.4 MB/s
500000 direct 7.6 MB in 18.47ms i.e. 27,057,741/s, aver. 0us, 412.8 MB/s
- TObjectDynArrayWrapper: 167,501 assertions passed 15.49ms
- TObjArray: 3,230 assertions passed 1.57ms
- Custom RTL: 77,552 assertions passed 356.78ms
FillCharFast [] in 14.88ms, 26.1 GB/s
MoveFast [] in 1.92ms, 8.1 GB/s
small MoveFast [] in 6.64ms, 3.2 GB/s
big MoveFast [] in 41.15ms, 9.4 GB/s
FillCharFast [cpuAVX] in 12.26ms, 31.6 GB/s
MoveFast [cpuAVX] in 1.59ms, 9.8 GB/s
small MoveFast [cpuAVX] in 6.50ms, 3.3 GB/s
big MoveFast [cpuAVX] in 40.86ms, 9.5 GB/s
- Fast string compare: 71 assertions passed 19us
- IdemPropName: 216 assertions passed 36us
- Url encoding: 152 assertions passed 829us
- GUID: 10,005 assertions passed 4ms
- ParseCommandArguments: 232 assertions passed 30us
- IsMatch: 4,250 assertions passed 233us
- TExprParserMatch: 140 assertions passed 55us
- Soundex: 35 assertions passed 19us
- Numerical conversions: 2,541,554 assertions passed 413.12ms
100000 FloatToText in 73.02ms i.e. 1,369,375/s, aver. 0us, 24.8 MB/s
100000 str in 38.35ms i.e. 2,607,493/s, aver. 0us, 59.6 MB/s
100000 DoubleToShort in 13.65ms i.e. 7,322,788/s, aver. 0us, 146.7 MB/s
100000 DoubleToAscii in 13.21ms i.e. 7,567,731/s, aver. 0us, 153.1 MB/s
- Integers: 33,860 assertions passed 44.55ms
- crc32c: 320,100 assertions passed 104.10ms
pas 265.6 MB/s fast 1.2 GB/s sse42 4.2 GB/s sse42+aesni 7.4 GB/s
- Random32: 201,002 assertions passed 452.29ms
- Bloom filters: 2,010,072 assertions passed 369.01ms
- DeltaCompress: 87 assertions passed 12.45ms
- Curr 64: 20,056 assertions passed 1.62ms
- CamelCase: 11 assertions passed 11us
- Bits: 32,657 assertions passed 39ms
- Ini files: 7,028 assertions passed 72.87ms
- UTF8: 1,067,760 assertions passed 1.02s
- Url decoding: 1,101 assertions passed 186us
- Baudot code: 10,007 assertions passed 42.59ms
- Iso 8601 date and time: 200,831 assertions passed 7.80ms
- Time zones: 400 assertions passed 200.26ms
- Mime types: 30 assertions passed 51us
- Quick select: 4,015 assertions passed 141.18ms
- TSynTable: 875 assertions passed 1.44ms
- TSynCache: 404 assertions passed 80us
- TSynFilter: 804 assertions passed 2.10ms
- TSynValidate: 677 assertions passed 568us
- TSynLogFile: 43 assertions passed 460us
- TSynUniqueIdentifier: 1,300,002 assertions passed 372.49ms
Total failed: 0 / 22,696,345 - Low level common PASSED 8.22s
1.2. Low level types:
- RTTI: 1,340 assertions passed 466us
- Url encoding: 200 assertions passed 450us
- Encode decode JSON: 430,907 assertions passed 138.94ms
- Wiki markdown to html: 56 assertions passed 74us
- Variants: 88 assertions passed 46us
- Mustache renderer: 153 assertions passed 2ms
- TDocVariant: 91,785 assertions passed 74.10ms
- TDecimal128: 17,446 assertions passed 1.92ms
- BSON: 245,070 assertions passed 7.60ms
100000 TBSONObjectID.ComputeNew in 6.58ms i.e. 15,190,642/s, aver. 0us
- TSynTableStatement: 221 assertions passed 98us
- TSynMonitorUsage: 1,202 assertions passed 83us
Total failed: 0 / 788,468 - Low level types PASSED 225.88ms
1.3. Cryptographic routines:
- Adler32: 1 assertion passed 21us
- MD5: 167 assertions passed 242us
- SHA1: 17 assertions passed 6.95ms
- SHA256: 40 assertions passed 46.65ms
using SSE4 instruction set
- SHA512: 27 assertions passed 28.26ms
- SHA3: 8,225 assertions passed 45.84ms
- AES256: 18,100 assertions passed 338.18ms
cypher 1..450 bytes with AES-NI: 209us, without: 1.21ms
- AES_GCM: 212 assertions passed 224us
- RC4: 1,011 assertions passed 2.05ms
- Base64: 13,992 assertions passed 424.62ms
- CompressShaAes: 1,683 assertions passed 3.10ms
- TAESPNRG: 31,309 assertions passed 64.60ms
- CryptDataForCurrentUser: 5,000 assertions passed 11.58ms
2000 AES-CFB in 7.51ms i.e. 266,134/s, aver. 3us, 138.7 MB/s
- JWT: 162,737 assertions passed 323.81ms
1000 HS256 in 2.19ms i.e. 456,204/s, aver. 2us
1000 HS384 in 2.25ms i.e. 444,049/s, aver. 2us
1000 HS512 in 2.16ms i.e. 461,680/s, aver. 2us
1000 S3224 in 1.84ms i.e. 541,711/s, aver. 1us
1000 S3256 in 1.85ms i.e. 540,540/s, aver. 1us
1000 S3384 in 1.89ms i.e. 528,262/s, aver. 1us
1000 S3512 in 2.20ms i.e. 453,103/s, aver. 2us
1000 S3S128 in 1.84ms i.e. 541,418/s, aver. 1us
1000 S3S256 in 1.87ms i.e. 533,049/s, aver. 1us
100 ES256 in 114.59ms i.e. 872/s, aver. 1.14ms
- Benchmark: 67,500 assertions passed 637.78ms
2500 crc32c in 367us i.e. 6811989/s or 14.1 GB/s
2500 xxhash32 in 1.27ms i.e. 1956181/s or 4 GB/s
2500 hash32 in 687us i.e. 3639010/s or 7.5 GB/s
2500 md5 in 12.73ms i.e. 196263/s or 417.6 MB/s
2500 sha1 in 22.36ms i.e. 111801/s or 237.9 MB/s
2500 hmacsha1 in 24.74ms i.e. 101050/s or 215 MB/s
2500 sha256 in 26.11ms i.e. 95741/s or 203.7 MB/s
2500 hmacsha256 in 28.62ms i.e. 87324/s or 185.8 MB/s
2500 sha384 in 23.38ms i.e. 106906/s or 227.5 MB/s
2500 hmacsha384 in 27.65ms i.e. 90402/s or 192.3 MB/s
2500 sha512 in 28.65ms i.e. 87232/s or 185.6 MB/s
2500 hmacsha512 in 27.75ms i.e. 90073/s or 191.6 MB/s
2500 sha3_256 in 44.80ms i.e. 55799/s or 118.7 MB/s
2500 sha3_512 in 86.81ms i.e. 28795/s or 61.2 MB/s
2500 rc4 in 22.75ms i.e. 109880/s or 233.8 MB/s
2500 aes128cfb in 11.45ms i.e. 218245/s or 464.4 MB/s
2500 aes128ofb in 7.35ms i.e. 339720/s or 723 MB/s
2500 aes128cfbcrc in 13.60ms i.e. 183701/s or 390.9 MB/s
2500 aes128ofbcrc in 9.78ms i.e. 255388/s or 543.5 MB/s
2500 aes128gcm in 42.88ms i.e. 58292/s or 124 MB/s
2500 aes256cfb in 13.84ms i.e. 180557/s or 384.2 MB/s
2500 aes256ofb in 9.82ms i.e. 254478/s or 541.5 MB/s
2500 aes256cfbcrc in 15.37ms i.e. 162654/s or 346.1 MB/s
2500 aes256ofbcrc in 11.60ms i.e. 215350/s or 458.3 MB/s
2500 aes256gcm in 44.42ms i.e. 56270/s or 119.7 MB/s
2500 shake128 in 36.44ms i.e. 68600/s or 146 MB/s
2500 shake256 in 41.93ms i.e. 59618/s or 126.8 MB/s
Total failed: 0 / 310,021 - Cryptographic routines PASSED 1.93s
1.4. ECC cryptography:
- Reference vectors: 23 assertions passed 13.30ms
- ecc_make_key: 200 assertions passed 172.40ms
- ecdsa_sign: 200 assertions passed 187.53ms
- ecdsa_verify: 200 assertions passed 217.56ms
- ecdh_shared_secret: 597 assertions passed 361.77ms
- Certificates and signatures: 91 assertions passed 43.91ms
- ECC command line tool: 469 assertions passed 254.74ms
- ECDHE stream protocol: 521,295 assertions passed 580.86ms
Total failed: 0 / 523,075 - ECC cryptography PASSED 1.83s
1.5. Compression:
- In memory compression: 12 assertions passed 1.42s
- GZIP format: 29 assertions passed 3.12s
- ZIP format: 66 assertions passed 8.24s
- SynLZO: 3,006 assertions passed 354.75ms
- SynLZ: 23,308 assertions passed 313.54ms
- TAlgoCompress: 914 assertions passed 48.98ms
TAlgoSynLZ 167.6 KB->77.3 KB: comp 174:80MB/s decomp 192:416MB/s
TAlgoLizard 167.6 KB->64.4 KB: comp 13:5MB/s decomp 492:1279MB/s
TAlgoLizardFast 167.6 KB->84.7 KB: comp 249:126MB/s decomp 631:1249MB/s
TAlgoLizardHuffman 167.5 KB->79 KB: comp 84:40MB/s decomp 372:790MB/s
TAlgoDeflate 167.7 KB->37.1 KB: comp 15:3MB/s decomp 28:127MB/s
TAlgoDeflateFast 167.5 KB->45.2 KB: comp 40:10MB/s decomp 29:110MB/s
Total failed: 0 / 27,335 - Compression PASSED 13.52s
1.6. Protocols:
- RTSP over HTTP: 1,900 assertions passed 253.47ms
Total failed: 0 / 1,900 - Protocols PASSED 253.50ms
2. mORMot
2.1. File based:
- Database direct access: 22,278 assertions passed 76.55ms
- Virtual table direct access: 12 assertions passed 457us
- TSQLTableJSON: 144,083 assertions passed 85.39ms
- TSQLRestClientDB: 310,073 assertions passed 605.38ms
- TRecordVersion: 20,060 assertions passed 84.12ms
Total failed: 0 / 496,506 - File based PASSED 851.99ms
2.2. File based memory map:
- Database direct access: 22,258 assertions passed 55.86ms
- Virtual table direct access: 12 assertions passed 418us
- TSQLTableJSON: 144,083 assertions passed 80.48ms
- TSQLRestClientDB: 310,071 assertions passed 572.53ms
- TRecordVersion: 20,060 assertions passed 80.74ms
Total failed: 0 / 496,484 - File based memory map PASSED 790.11ms
2.3. File based WAL:
- Database direct access: 22,278 assertions passed 74.28ms
- Virtual table direct access: 12 assertions passed 452us
- TSQLTableJSON: 144,083 assertions passed 81.20ms
- TSQLRestClientDB: 310,073 assertions passed 589.95ms
- TRecordVersion: 20,060 assertions passed 83.49ms
Total failed: 0 / 496,506 - File based WAL PASSED 829.45ms
2.4. Memory based:
- Database direct access: 22,258 assertions passed 55.87ms
- Virtual table direct access: 12 assertions passed 313us
- TSQLTableJSON: 144,083 assertions passed 79.37ms
- TSQLRestClientDB: 402,407 assertions passed 1.27s
- TRecordVersion: 20,060 assertions passed 94.71ms
- TSQLTableWritable: 24,056 assertions passed 3.48ms
- RTree: 280,024 assertions passed 1.28s
10000 With RTree in 650.08ms i.e. 15,382/s, aver. 65us
10000 With RTreeInteger in 622.98ms i.e. 16,051/s, aver. 62us
- Shard write: 10,602 assertions passed 176.68ms
- Shard read: 140,001 assertions passed 257.15ms
- Shard read after purge: 114,003 assertions passed 221.65ms
- MaxShardCount: 144,002 assertions passed 206.60ms
Total failed: 0 / 1,301,508 - Memory based PASSED 3.65s
2.5. Basic classes:
- TSQLRecord: 87 assertions passed 244us
- TSQLRecordSigned: 200 assertions passed 2.64ms
- TSQLModel: 16 assertions passed 53us
- TSQLRestServerFullMemory: 1,130,730 assertions passed 1.38s
Total failed: 0 / 1,131,033 - Basic classes PASSED 1.38s
2.6. Client server access:
- TSQLHttpServer: 2 assertions passed 2.32ms
using Synopse Sockets.514
- TSQLHttpClient: 4 assertions passed 10.89ms
using TSQLHttpClientWinSock
- HTTP client keep alive: 4,087 assertions passed 88.41ms
4.7 KB, first 1.81ms, done 81.54ms i.e. 12262/s, aver. 81us, 57.3 MB/s
- HTTP client multi connect: 4,087 assertions passed 158.79ms
4.7 KB, first 242us, done 151.31ms i.e. 6608/s, aver. 151us, 30.9 MB/s
- HTTP client encrypted: 4,087 assertions passed 107.19ms
4.7 KB, first 296us, done 102.14ms i.e. 9789/s, aver. 102us, 45.7 MB/s
- HTTP client custom encryption aes sha: 4,087 assertions passed 105.96ms
4.7 KB, first 115us, done 101.52ms i.e. 9849/s, aver. 101us, 46 MB/s
- HTTP client custom encryption aes: 4,087 assertions passed 107.63ms
4.7 KB, first 121us, done 102.70ms i.e. 9736/s, aver. 102us, 45.5 MB/s
- HTTP client custom encryption sha: 4,087 assertions passed 108.28ms
4.7 KB, first 111us, done 103.74ms i.e. 9638/s, aver. 103us, 45 MB/s
- Direct in process access: 4,056 assertions passed 25.69ms
4.7 KB, first 34us, done 18.15ms i.e. 55069/s, aver. 18us, 257.4 MB/s
- HTTP several DB servers: 12,604 assertions passed 282.55ms
4.7 KB, first 244us, done 66.95ms i.e. 14936/s, aver. 66us, 69.8 MB/s
4.7 KB, first 274us, done 68.32ms i.e. 14636/s, aver. 68us, 68.4 MB/s
4.7 KB, first 257us, done 78.58ms i.e. 12725/s, aver. 78us, 59.5 MB/s
Total failed: 0 / 41,188 - Client server access PASSED 998.15ms
2.7. Service oriented architecture:
- Weak interfaces: 56 assertions passed 50us
- Service initialization: 268 assertions passed 1.57ms
- Direct call: 596,049 assertions passed 28.87ms
- Server side: 596,069 assertions passed 28.87ms
- Client side REST: 794,759 assertions passed 777.04ms
- Client side REST as JSON object: 794,753 assertions passed 820.11ms
- Client side REST sessions stats: 794,753 assertions passed 887.46ms
- Client side REST locked: 794,757 assertions passed 795.57ms
- Client side REST main thread: 794,757 assertions passed 2.28s
- Client side REST background thread: 794,757 assertions passed 2.34s
- Client side REST sign with crc 32c: 794,753 assertions passed 763.08ms
- Client side REST sign with xxhash: 794,753 assertions passed 762.93ms
- Client side REST sign with md 5: 794,753 assertions passed 797.81ms
- Client side REST sign with sha 256: 794,753 assertions passed 809.86ms
- Client side REST sign with sha 512: 794,753 assertions passed 842.80ms
- Client side REST weak authentication: 794,753 assertions passed 733.65ms
- Client side REST basic authentication: 794,753 assertions passed 977.12ms
- Client side REST custom record layout: 794,753 assertions passed 891.95ms
- Client side REST service log to DB: 794,753 assertions passed 1.52s
- Client side JSONRPC: 794,753 assertions passed 827.41ms
- Test over HTTP: 10,482 assertions passed 178.12ms
- Security: 139 assertions passed 2.19ms
- Mocks and stubs: 30,030 assertions passed 51.22ms
Total failed: 0 / 13,949,159 - Service oriented architecture PASSED 17.12s
2.8. Bidirectional remote connection:
- Websockets JSON protocol: 60 assertions passed 44us
- Websockets binary protocol: 60 assertions passed 34us
- Websockets binary protocol encrypted: 60 assertions passed 44us
- Websockets binary protocol compressed: 60 assertions passed 28us
- Websockets binary protocol compress encrypted: 60 assertions passed 45us
- Run http server: 2 assertions passed 1.41ms
- SOA callback on server side: 4,580 assertions passed 2.03ms
- SOA callback via JSON websockets: 6,898 assertions passed 298.27ms
- SOA callback via binary websockets: 6,898 assertions passed 348.84ms
- Relay start: 4 assertions passed 3.71ms
- Relay SOA callback via JSON websockets: 6,899 assertions passed 620.73ms
- Relay connection recreate: 1 assertion passed 3.81ms
- Relay SOA callback via binary websockets: 6,899 assertions passed 574.88ms
- Relay shutdown: 2 assertions passed 112.62ms
- TRecordVersion: 20,068 assertions passed 122.25ms
Total failed: 0 / 52,551 - Bidirectional remote connection PASSED 2.09s
2.9. External database:
- TQuery: 2,003 assertions passed 3.43ms
- SynDBRemote: 35,589 assertions passed 110.98ms
- DB properties persistence: 7 assertions passed 295us
- External records: 2 assertions passed 275us
- Auto adapt SQL: 966 assertions passed 8.84ms
- Crypted database: 253,277 assertions passed 160.60ms
- External via REST: 170,355 assertions passed 749.14ms
- External via virtual table: 170,355 assertions passed 1.32s
- External via REST with change tracking: 180,455 assertions passed 1.69s
Total failed: 0 / 813,009 - External database PASSED 4.05s
2.10. Multi thread process:
- Create thread pool: 1 assertion passed 1.11ms
- TSQLRestServerDB: 4,822 assertions passed 1s
1=39238/s 2=18657/s 5=7862/s 10=3934/s 30=1312/s 50=787/s
- TSQLRestClientDB: 4,822 assertions passed 1.02s
1=17280/s 2=19575/s 5=7850/s 10=3934/s 30=1310/s 50=786/s
- Socket API: 4,822 assertions passed 1.07s
1=7916/s 2=10934/s 5=7897/s 10=3937/s 30=1311/s 50=785/s
- Websockets: 4,822 assertions passed 1.11s
1=5073/s 2=8221/s 5=7244/s 10=3936/s 30=1311/s 50=786/s
- libcurl: 4,822 assertions passed 1.11s
1=5057/s 2=8904/s 5=7546/s 10=3903/s 30=1310/s 50=787/s
- Locked: 4,822 assertions passed 1.02s
1=16346/s 2=19583/s 5=7878/s 10=3932/s 30=1311/s 50=786/s
- Unlocked: 4,822 assertions passed 1.02s
1=15386/s 2=19648/s 5=7816/s 10=3933/s 30=1311/s 50=786/s
- Main thread: 4,822 assertions passed 1.20s
1=7512/s 2=7960/s 5=5167/s 10=3085/s 30=1183/s 50=738/s
- Background thread: 4,822 assertions passed 1.02s
1=14800/s 2=19696/s 5=7831/s 10=3933/s 30=1310/s 50=786/s
Total failed: 0 / 43,399 - Multi thread process PASSED 9.81s
2.11. DDD shared units:
- User model: 4,527 assertions passed 1.10ms
- Authentication model: 20,006 assertions passed 109.43ms
- Email validation process: 55 assertions passed 33.22ms
- User CQRS repository: 57,106 assertions passed 463.21ms
Total failed: 0 / 81,694 - DDD shared units PASSED 607.10ms
2.12. DDD multi thread:
- Delete old database: 1 assertion passed 3.88ms
- Start server: 1 assertion passed 7.07ms
- Single client test: 1,002 assertions passed 96.41ms
- Multi threaded clients test: 21 assertions passed 150.04ms
Total failed: 0 / 1,025 - DDD multi thread PASSED 264.01ms
Ubuntu 20.04.1 LTS - Linux 5.4.0-58-generic (cp65001)
4 x Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz (x64)
Using mORMot 1.18.6201 x64MM PRTL
TSQLite3LibraryStatic 3.34.0 with internal MM
Generated with: Free Pascal 3.2 64 bit compiler
Time elapsed for all tests: 1m08
Performed 2021-01-10 11:22:38 by ab on devlaptop
Total assertions failed for all test suits: 0 / 43,251,206
! All tests passed successfully.
Memory Usage Report:
Flags: debug repmemleak
Small: blocks=6K size=519KB (part of Medium arena)
Medium: 10MB/123MB peak=25MB current=8 alloc=99 free=91 sleep=253
Large: 0B/1GB peak=100MB current=0 alloc=458 free=458 sleep=0
Total Sleep: count=3K rdtsc=715M
Small Sleep: getmem=0 freemem=3K
freemem(48)=298 freemem(48)=267 freemem(48)=260 freemem(48)=256
freemem(48)=254 freemem(48)=241 freemem(48)=233 freemem(48)=186
freemem(176)=133 freemem(144)=110 freemem(64)=100 freemem(192)=93
Small Blocks since beginning: 62M/6GB
48=24M 64=12M 32=5M 80=4M 176=3M 96=2M 624=1M 128=1M
240=1M 224=927K 160=905K 112=802K 144=642K 192=487K 352=246K 304=202K
Small Blocks current: 6K/519KB
48=4K 64=832 96=242 80=181 160=120 32=111 256=90 128=83
352=65 384=65 624=46 112=45 480=28 576=20 736=15 240=8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment