#1 2011-04-20 14:01:16

WladiD
Member
From: Germany
Registered: 2010-10-27
Posts: 35

Small issue in TSQLRestServerStats.DebugMessage

Hi Arnaud,

I found a small issue in TSQLRestServerStats.DebugMessage:

resourcestring
  sRestServerStatsDebugMessage =
    'Clients now=%d max=%d'#13+
    'Data in=%s out=%s'#13+
    'Requests=%d Updates=%d Invalid=%d'
{$ifdef MSWINDOWS} // NOTE: This conditional should be also "WITHSTATPROCESS"
    +#13'Time spent in requests = %s'
{$endif};


function TSQLRestServerStats.DebugMessage: string;
begin
  result := format(sRestServerStatsDebugMessage,
    [ClientsCurrent,ClientsMax,kb(IncomingBytes),kb(OutcomingBytes),
     Responses,Modified,Invalid{$ifdef WITHSTATPROCESS},ProcessTimeString{$endif}]);
end;

The format function fails, if WITHSTATPROCESS is not defined, because the resource string don't match the parameters.

Best regards!

Offline

#2 2011-04-20 15:16:31

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,240
Website

Re: Small issue in TSQLRestServerStats.DebugMessage

Yes, you're right.

This was introduced with the new logging mechanism, since ProcessTime is not available any more.

Thanks for the report.

Fixed in http://synopse.info/fossil/info/186436fe21

Offline

Board footer

Powered by FluxBB