Skip to content

Commit

Permalink
raw sample tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Bouchez committed Apr 17, 2024
1 parent 72934e6 commit 15e284e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions ex/techempower-bench/raw.pas
Expand Up @@ -62,7 +62,7 @@
end;
TWorlds = array of TWorldRec;
TFortune = packed record
id: integer;
id: PtrUInt;
message: PUtf8Char;
end;
TFortunes = array of TFortune;
Expand Down Expand Up @@ -166,7 +166,7 @@ function ComputeRandomWorld: integer; inline;
end;

function GetQueriesParamValue(ctxt: THttpServerRequest;
const search: RawUtf8 = 'QUERIES='): cardinal;
const search: RawUtf8 = 'QUERIES='): cardinal; inline;
begin
if not ctxt.UrlParam(search, result) or
(result = 0) then
Expand Down Expand Up @@ -217,7 +217,7 @@ constructor TRawAsyncServer.Create(
if fStore.Server.Cache.SetCache(TOrmCachedWorld) then
fStore.Server.Cache.FillFromQuery(TOrmCachedWorld, '', []);
fCachedWorldsTable := fStore.Orm.Cache.Table(TOrmCachedWorld);
fStore.RetrieveListObjArray(fRawCache, TOrmCachedWorld, 'order by id', []);
fStore.Orm.RetrieveListObjArray(fRawCache, TOrmCachedWorld, 'order by id', []);
// initialize the mustache template for /fortunes
fTemplate := TSynMustache.Parse(FORTUNES_TPL);
// setup the HTTP server
Expand Down Expand Up @@ -820,8 +820,8 @@ procedure TAsyncWorld.OnRes(Statement: TSqlDBPostgresAsyncStatement;
// register some RTTI for records JSON serialization
Rtti.RegisterFromText([
TypeInfo(TMessageRec), 'message:PUtf8Char',
TypeInfo(TWorldRec), 'id,randomNumber:integer',
TypeInfo(TFortune), 'id:integer message:PUtf8Char']);
TypeInfo(TWorldRec), 'id,randomNumber:cardinal',
TypeInfo(TFortune), 'id:PtrUInt message:PUtf8Char']);

// compute default execution context from HW information
cpuCount := CurrentCpuSet(cpuMask); // may run from a "taskset" command
Expand Down
2 changes: 1 addition & 1 deletion src/mormot.commit.inc
@@ -1 +1 @@
'2.2.7365'
'2.2.7366'

0 comments on commit 15e284e

Please sign in to comment.