Created
September 14, 2021 23:43
-
-
Save TTomas/b77f951b54737996aacb582ae5f29adc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Part of source code on eof | |
IBX Time0 = 31.13ms 8.35ms 9.86ms 8.19ms 8.34ms | |
IBX Time1 = 120.69ms 109.61ms 106.19ms 106.40ms 106.54ms | |
IBX Time2 = 1.13s 1.92s 811.44ms 2.09s 827.45ms | |
IBX Time3 = 5.35ms 13.48ms 5.33ms 14.50ms 6.64ms | |
IBX Time4 = 2.65ms 6.93ms 2.78ms 7.56ms 3.11ms | |
IBX Time5 = 4.43ms 11.53ms 5.27ms 12.84ms 5.07ms | |
IBX Time6 = 2.44ms 7.09ms 2.81ms 7.59ms 3.04ms | |
IBX Time7 = 3.22ms 7.86ms 3.78ms 8.57ms 3.64ms | |
IBX Time8 = 4.86ms 13.19ms 6.70ms 14.51ms 6.40ms | |
IBX Time9 = 3.08ms 7.26ms 3.37ms 7.98ms 3.33ms | |
ZEO Time0 = 21.40ms 8.43ms 8.08ms 8.10ms 7.63ms | |
ZEO Time1 = 77.71ms 75.79ms 74.50ms 68.00ms 68.19ms | |
ZEO Time2 = 875.10ms 1.84s 561.14ms 1.09s 1.65s | |
ZEO Time3 = 5.75ms 17.47ms 6.44ms 9.85ms 17.63ms | |
ZEO Time4 = 1.93ms 7.19ms 2.05ms 3.43ms 7.09ms | |
ZEO Time5 = 3.54ms 12.69ms 4.14ms 6.62ms 12.24ms | |
ZEO Time6 = 1.73ms 6.46ms 1.91ms 3.08ms 6.49ms | |
ZEO Time7 = 2.40ms 7.60ms 2.49ms 3.52ms 7.73ms | |
ZEO Time8 = 5.18ms 15.77ms 5.25ms 12.02ms 15.99ms | |
ZEO Time9 = 2.26ms 7.33ms 2.03ms 3.43ms 7.12ms | |
// IBX with ZEOSTRANS define, keep started transaction for select | |
// only commit for update,insert,delete as Zeos | |
IBX Time0 = 22.08ms 8.25ms 8.10ms 7.68ms 7.40ms | |
IBX Time1 = 122.97ms 114.20ms 110.38ms 119.44ms 106.41ms | |
IBX Time2 = 626.14ms 1.44s 928.78ms 562.90ms 1.03s | |
IBX Time3 = 7.72ms 10.44ms 14.22ms 6.62ms 10.80ms | |
IBX Time4 = 2.40ms 3.89ms 5.46ms 2.31ms 3.85ms | |
IBX Time5 = 5.02ms 7.50ms 10.31ms 4.49ms 7.41ms | |
IBX Time6 = 2.01ms 3.79ms 5.15ms 2.07ms 3.51ms | |
IBX Time7 = 3.45ms 5.98ms 8.09ms 3.50ms 5.80ms | |
IBX Time8 = 6.25ms 9.43ms 12.87ms 5.55ms 9.24ms | |
IBX Time9 = 2.52ms 4ms 5.62ms 2.32ms 3.86ms | |
timer.start; | |
fPeopleData := Client.Client.List([TOrmPeople], '*'); | |
R.FillPrepare(fPeopleData); | |
Memo1.Lines.Add(FormatUtf8('IBX Time0 = %', [timer.Stop])); | |
timer.start; | |
if not CheckFailed(R.FillContext <> nil, '1. R.FillContext') then | |
begin | |
Client.BatchStart(TOrmPeople, 1111); | |
n := 0; | |
while n<1111 do //R.FillOne do | |
begin | |
R.YearOfBirth := n; | |
Client.BatchAdd(R, true); | |
inc(n); | |
end; | |
Check(Client.BatchSend(res) = HTTP_SUCCESS, '2. BatchSend'); | |
Memo1.Lines.Add(FormatUtf8('IBX Time1 = %', [timer.Stop])); | |
Check(length(res) = n, '3. length(res)'); | |
timer.Start; | |
for i := 1 to 1111 do | |
begin | |
R.ClearProperties; | |
Check(Client.Retrieve(res[Random(n)], R), FormatUTF8('4.%. Client.Retrieve', [i])); | |
Check(R.ID <> 0, FormatUTF8('5.%. R.ID=0', [i])); | |
Check(res[R.YearOfBirth] = R.ID, FormatUTF8('6.%. R.YearOfBirth<>ID', [i])); | |
end; | |
Memo1.Lines.Add(FormatUtf8('IBX Time2 = %', [timer.Stop])); | |
end; | |
timer.Start; | |
for i := 0 to high(ids) do | |
begin | |
R.YearOfBirth := i; | |
ids[i] := Client.Add(R, true); | |
end; | |
Memo1.Lines.Add(FormatUtf8('IBX Time3 = %', [timer.Stop])); | |
timer.Start; | |
for i := 0 to high(ids) do | |
begin | |
Check(Client.Retrieve(ids[i], R), '7. Retrieve(ids[i]'); | |
Check(R.YearOfBirth = i, '8. ids R.YearOfBirth<>i'); | |
end; | |
Memo1.Lines.Add(FormatUtf8('IBX Time4 = %', [timer.Stop])); | |
timer.Start; | |
for i := 0 to high(ids) do | |
begin | |
Client.BatchStart(TOrmPeople); | |
Client.BatchDelete(ids[i]); | |
Check(Client.BatchSend(res) = HTTP_SUCCESS, '9. BatchSend Delete ids'); | |
Check(length(res) = 1, '10. BatchSend Delete ids length(res)<>1'); | |
Check(res[0] = HTTP_SUCCESS, '11. BatchSend Delete ids not HTTP_SUCCESS'); | |
end; | |
Memo1.Lines.Add(FormatUtf8('IBX Time5 = %', [timer.Stop])); | |
timer.Start; | |
for i := 0 to high(ids) do | |
Check(not Client.Retrieve(ids[i], R), '12. not Client.Retrieve(ids[i], R)'); | |
Memo1.Lines.Add(FormatUtf8('IBX Time6 = %', [timer.Stop])); | |
timer.Start; | |
R.ClearProperties; | |
for i := 0 to high(ids) do | |
begin | |
R.IDValue := ids[i]; | |
Check(Client.Update(R), '13. test locking'); | |
end; | |
Memo1.Lines.Add(FormatUtf8('IBX Time7 = %', [timer.Stop])); | |
timer.Start; | |
for i := 0 to high(ids) do | |
begin | |
R.YearOfBirth := i; | |
ids[i] := Client.Add(R, true); | |
end; | |
Memo1.Lines.Add(FormatUtf8('IBX Time8 = %', [timer.Stop])); | |
timer.Start; | |
for i := 0 to high(ids) do | |
begin | |
Check(Client.Retrieve(ids[i], R), '14. Client.Retrieve(ids[i], R)'); | |
Check(R.YearOfBirth = i, '15. R.YearOfBirth = i'); | |
end; | |
Memo1.Lines.Add(FormatUtf8('IBX Time9 = %', [timer.Stop])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment