IiopGetStatistics Function

Action

Measures a specified time or delay and the number of location forwards that were necessary to handle the request.

Include file

IIOP.bdh

Syntax

IiopGetStatistics( in  hIiop     : number,
                   in  nMeasure  : number,
                   out nForwards : number,
                   out fTime     : float ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Handle to a CORBA object
nMeasure

Specifies which time or delay to measure. Possible values are:

  • IIOP_ROUNDTRIP. Total delay between starting and finishing processing the IIOP request

  • IIOP_SERVER_BUSY. Time passing from sending the last byte until receiving the first byte

nForwards Variable receiving the number of location forwards that were necessary to handle the request
fTime Variable receiving the time or delay (as the case may be) in seconds

Example

dcltrans
  transaction TGetStatistics
  const
    HOST   := "192.168.20.21"; // server
    PORT   := 1052; // port
    KEY    := "...\h00"; // key
    KEYLEN := 4; // key length
  var
    hIiop     : number; // handle to CORBA object
    nForwards : number;
    fTime     : float;
  begin
    IiopSetMaxGiopVersion("1.0");
    IiopSetByteOrder(IIOP_BIG_ENDIAN);
    
    // retrieve handle to server
    IiopObjectCreate(hIiop, "IDL:DemoObject:1.0", "1.2",
                     HOST, PORT, KEY, KEYLEN);

    // call request "Init"
    IiopRequest(hIiop, "Init");

    // retrieve statistics
    IiopGetStatistics(hIiop, IIOP_ROUNDTRIP, nForwards, fTime);
    write("location forwards = "); write(nForwards); writeln;
    write("total delay = "); write(fTime); writeln;
    IiopObjectRelease(hIiop);
  end TGetStatistics;

Output

location forwards = 1total delay = 0.051000