PdceRegisterClient Function

Action

This function registers any client to the data collection engine.

The first parameter returns a handle that is needed for further PDCE functions.

The second parameter returns the interval in seconds, in which the PDCE collects data for the client. The default update interval for collecting the monitor data is 60 seconds, but you can adjust the monitoring interval by opening the Project Attribute Dialog (Project > Project Attributes) and changing the attribute value of the attribute MeasureCollectionInterval. This interval can also be changed any time by the PdceClientInterval() function.

注: Collecting data in a smaller interval than 1 second is not allowed and results in an error.

Include file

Pdce.bdh

Syntax

PdceRegisterClient( inout hClient   : number,
                      out   nInterval : number ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hClient Specifies the client's handle.
nInterval Specifies a number for the determined query interval (in seconds).

Example

benchmark Collect
use "pdce.bdh" 

const  
  MEASURE_NAME01 := "PE_% Processor Time(0)@LAB35";  
  MEASURE_KEY01  := "PERFMON:\\Processor(0)\\% Processor Time@LAB35"; 

var  
  nInterval  : number;  
  hClient01  : number;  
  hMeasure01 : number; 

dcluser  
  user    
    Collect  
  transactions    
    NoTRT_TStartup : begin;    
    NoTRT_TCollect : 5;    
    NoTRT_TEnd     : end; 

dcltrans  
  transaction NoTRT_TStartup  
  begin
   PdceStartUp();
   PdceRegisterClient(hClient01, nInterval);
   PdceAddMeasure(hClient01, MEASURE_NAME01, MEASURE_KEY01, hMeasure01);
   Wait(float(2*nInterval));
 end NoTRT_TStartup;    

  transaction NoTRT_TCollect  
  begin
   PdceGetMeasureValue(hMeasure01, MEASURE_NAME01);
   if (GetWorkloadModel() <> WORKLOAD_MONITORING) then
     Wait(float(nInterval));
   end;
 end NoTRT_TCollect;    

  transaction NoTRT_TEnd  begin
   PdceMeasureUnSubscribe(hMeasure01);
   PdceClientUnRegister(hClient01);
   PdceCleanUp();
 end NoTRT_TEnd;