#1 2016-02-07 13:04:58

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 185

TestSQL3 in Delphi2007

mORMot 1.18.2363:

   Synopse mORMot Framework Automated tests
  ------------------------------------------


1. Synopse libraries

 1.1. Low level common:
  - System copy record: 83 assertions passed  341us
  - TRawUTF8List: 130,009 assertions passed  161.94ms
  - TDynArray: 1,082,725 assertions passed  208.75ms
  - TDynArrayHashed: 1,200,629 assertions passed  150.88ms
  - TObjectListHashed: 999,885 assertions passed  481.28ms
  - TObjectDynArrayWrapper: 167,501 assertions passed  33.15ms
  - TObjArray: 2,016 assertions passed  1.95ms
  - Fast string compare: 24 assertions passed  303us
  - IdemPropName: 197 assertions passed  296us
  - Url encoding: 150 assertions passed  1.27ms
  - GUID: 9,005 assertions passed  1.82ms
  - IsMatch: 599 assertions passed  415us
  - Soundex: 35 assertions passed  266us
  - Numerical conversions: 1,116,206 assertions passed  368.59ms
  - crc32c: 20,020 assertions passed  74.89ms
      pas 25.63ms 232.7 MB/s fast 4.37ms 1.3 GB/s
  - Curr 64: 20,053 assertions passed  2.06ms
  - CamelCase: 11 assertions passed  292us
  - Bits: 4,774 assertions passed  6.25ms
  - Ini files: 7,004 assertions passed  35.12ms
  - UTF8: 105,137 assertions passed  973.23ms
  - Iso 8601 date and time: 48,017 assertions passed  7.98ms
  - Time zones: 407 assertions passed  16.88ms
  - Url decoding: 1,100 assertions passed  444us
  - Mime types: 27 assertions passed  390us
  - TSynTable: 875 assertions passed  4.46ms
  - TSynCache: 404 assertions passed  4.17ms
  - TSynFilter: 1,005 assertions passed  3.24ms
  - TSynValidate: 677 assertions passed  915us
  - TSynLogFile: 42 assertions passed  1.64ms
  - TSynUniqueIdentifier: 1,300,002 assertions passed  654.54ms
  Total failed: 0 / 6,218,619  - Low level common PASSED  3.22s

 1.2. Low level types:
  - RTTI: 410 assertions passed  734us
  - Url encoding: 200 assertions passed  831us
  - Encode decode JSON: 283,022 assertions passed  171.94ms
  - Variants: 48 assertions passed  401us
  - Mustache renderer: 144 assertions passed  4.21ms
  - TDocVariant: 71,783 assertions passed  190.75ms
  - BSON: 245,050 assertions passed  3.65ms
  - TSynTableStatement: 206 assertions passed  451us
  - TSynMonitorUsage: 1,202 assertions passed  452us
  Total failed: 0 / 602,065  - Low level types PASSED  385.46ms

 1.3. Big table:
  - TSynBigTable: 19,332 assertions passed  167.38ms
  - TSynBigTableString: 16,200 assertions passed  26.09ms
  - TSynBigTableMetaData: 475,563 assertions passed  1.30s
  - TSynBigTableRecord: 375,563 assertions passed  1.87s
  Total failed: 0 / 886,658  - Big table PASSED  3.37s

 1.4. Synopse PDF:
!  - TPdfDocument: 1 / 2 FAILED  10.66ms
  - TPdfDocumentGDI: 5 assertions passed  1.09s
  Total failed: 1 / 7  - Synopse PDF FAILED  1.11s

 1.5. Cryptographic routines:
  - Adler32: 1 assertion passed  684us
  - MD5: 86 assertions passed  696us
  - SHA1: 10 assertions passed  10.27ms
  - SHA256: 8 assertions passed  16.84ms
  - AES256: 16,816 assertions passed  1.02s
  - RC4: 1 assertion passed  193us
  - Base64: 11,994 assertions passed  127.47ms
  - CompressShaAes: 1,683 assertions passed  4.86ms
  Total failed: 0 / 30,599  - Cryptographic routines PASSED  1.19s

 1.6. Compression:
  - In memory compression: 12 assertions passed  399.71ms
  - GZIP format: 19 assertions passed  739.67ms
  - ZIP format: 79 assertions passed  2.84s
  - SynLZO: 3,006 assertions passed  121.23ms
  - SynLZ: 32,221 assertions passed  785.63ms
  Total failed: 0 / 35,337  - Compression PASSED  4.89s


2. mORMot

 2.1. File based:
  - Database direct access: 20,251 assertions passed  257.34ms
  - Virtual table direct access: 12 assertions passed  2.56ms
  - TSQLTableJSON: 144,070 assertions passed  154.01ms
! File based - TSQLRestClientDB
! Exception EAccessViolation raised with messsage:
!  Access violation at address 0044ED5A in module 'TestSQL3.exe'. Read of addres
s 1C96BD90
! File based - TRecordVersion
! Exception EAccessViolation raised with messsage:
!  Access violation at address 0044ED5A in module 'TestSQL3.exe'. Read of addres
s 1C96BC30

 2.2. File based memory map:
  - Database direct access: 20,246 assertions passed  244.52ms
  - Virtual table direct access: 12 assertions passed  2.43ms
  - TSQLTableJSON: 144,070 assertions passed  140.86ms
! File based memory map - TSQLRestClientDB
! Exception EAccessViolation raised with messsage:
!  Access violation at address 0044ED5A in module 'TestSQL3.exe'. Read of addres
s 1C96A840
! File based memory map - TRecordVersion
! Exception EAccessViolation raised with messsage:
!  Access violation at address 0044ED5A in module 'TestSQL3.exe'. Read of addres
s 1C96A9A0

 2.3. File based WAL:
  - Database direct access: 20,251 assertions passed  266.81ms
  - Virtual table direct access: 12 assertions passed  2.80ms
  - TSQLTableJSON: 144,070 assertions passed  155.39ms
! File based WAL - TSQLRestClientDB
! Exception EAccessViolation raised with messsage:
!  Access violation at address 0044ED5A in module 'TestSQL3.exe'. Read of addres
s 1C96A6E0
! File based WAL - TRecordVersion
! Exception EAccessViolation raised with messsage:
!  Access violation at address 0044ED5A in module 'TestSQL3.exe'. Read of addres
s 1C96BC30

 2.4. Memory based:
  - Database direct access: 20,246 assertions passed  236.26ms
  - Virtual table direct access: 12 assertions passed  1.68ms
  - TSQLTableJSON: 144,070 assertions passed  138.76ms
! Memory based - TSQLRestClientDB
! Exception EAccessViolation raised with messsage:
!  Access violation at address 0044ED5A in module 'TestSQL3.exe'. Read of addres
s 1C96A790
! Memory based - TRecordVersion
! Exception EAccessViolation raised with messsage:
!  Access violation at address 0044ED5A in module 'TestSQL3.exe'. Read of addres
s 1C96A9A0

In Delphi XE2 is fine.

Michal

Offline

#2 2016-02-07 20:25:50

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,060
Website

Re: TestSQL3 in Delphi2007

I am not able to reproduce this with Delphi 2007 compiler.

Are you sure you have the correct latest Sqlite3.obj files?

Offline

#3 2016-02-07 20:32:48

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 185

Re: TestSQL3 in Delphi2007

I tried .obj compiled by Delphi 2007 and XE2.
The effect is the same.

Michal

Offline

#4 2016-02-07 20:49:34

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 185

Re: TestSQL3 in Delphi2007

@ab,
It seems to me that an error occurs in this procedure:

procedure TSynMonitor.FillPerSecProperties;
begin
  if fTaskCount=0 then
    exit; // avoid division per zero
  fPerSec := fTotalTime.PerSecond(fTaskCount);   
  fAverageTime.MicroSec := Round(fTotalTime.MicroSec/fTaskCount);
end;

Michal

Offline

#5 2016-02-08 08:45:51

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,060
Website

Re: TestSQL3 in Delphi2007

Sounds like if there are some threading issue with TSynMonitor use.
I'll check and fix it.

And include the latest feature of the framework, i.e. TSynMonitorUsage - an automated statistics gathering of any process, in a database.

Offline

#6 2016-02-08 13:51:17

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,060
Website

Re: TestSQL3 in Delphi2007

OK.
I've made all TSynMonitor instances thread-safe.
And it was not enough for Delphi 2007...

After a lot of time, I understood that the Delphi 2007 compiler did not compile correctly inlined methods with QWord/Int64 parameters, like those:

    function PerSecond(const Count: QWord): QWord; inline;,

With the following, it worked:

    function PerSecond(const Count: QWord): QWord;
      {$ifdef FPC_OR_UNICODE}inline;{$endif} // Delphi 2007 is buggy as hell

sad

Now all tests do pass on my side:

Using mORMot 1.18.2365 FTS3
Running on Windows 7 64bit SP1 (6.1.7601) with code page 1252
TSQLite3LibraryStatic 3.10.2 with internal MM
Generated with: Delphi 2007 compiler

Time elapsed for all tests: 45.02s
Tests performed at 08/02/2016 14:49:09

Total assertions failed for all test suits:  0 / 23,129,542
 All tests passed successfully.

Offline

#7 2016-02-08 14:13:52

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,060
Website

Re: TestSQL3 in Delphi2007

Offline

#8 2016-02-08 14:59:17

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 185

Re: TestSQL3 in Delphi2007

@ab,

For me now, too. (1.18.2366).
Is fine.

It is interesting that on Windows 8.1-64 had more AV errors than on Windows 7.

Michal

Last edited by miab3 (2016-02-08 14:59:33)

Offline

Board footer

Powered by FluxBB