PdceClientInterval Function

Action

This function changes the interval in which the PDCE collects data for a registered client. The interval must be provided in milliseconds.

注: If you collect data in a smaller interval than 1000 milliseconds, your result measures may have incorrect values.

Include file

Pdce.bdh

Syntax

PdceClientInterval( in hPdce     :number,                    
                    in nInterval : number ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hPdce Specifies the client's handle, from the PdceClientRegister or PdceRegisterClient function.
nInterval Specifies an unsigned integer new for the query interval.

Example

const  
  STRING_SIZE            := 1024;  
  PERFMON_SAMPLE_MEASURE := "PERFMON:\\Processor(_Total)\\% Processor Time@localhost"; 

dcltrans  
  transaction TInit  
  var    
    sMeasureKey       : string;    
    sMeasureName      : array[10] of string;    
    sDescription      : string;    
    fPdceInitInterval : float;
  begin    
    PdceStartup();    
    PdceClientRegister(pClient, uiPdceInternalQueryInterval);    
    sMeasureKey     := PERFMON_SAMPLE_MEASURE;    
    sMeasureName[1] := "PerfmonMeasure1";    
    PdceAddMeasure(pClient, sMeasureName[1], sMeasureKey, pMeasure[1]);
    wait(fPdceInitInterval);    
    
    // change interval
    PdceClientInterval(pClient, uiNewPdceInternalQueryInterval);    
    PdceMeasureQueryInfo(pMeasure[1], sDescription, STRING_SIZE);     

    write(sMeasureName[1]);    
    write(": ");    
    writeln(sDescription);    
    writeln;  
end TInit;