SAP NetWeaver RFC SDK 7.50
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
JCo-like Throughput API

Functions for creating, destroying and working with throughput objects, which can be used to monitor performance relevant data of connections and servers. More...

Classes

struct  _RFC_THROUGHPUT_HANDLE
 Handle to a throughput object which can monitor performance relevant data of connections and servers. More...
 

Functions

DECL_EXP RFC_THROUGHPUT_HANDLE
SAP_API 
RfcCreateThroughput (RFC_ERROR_INFO *errorInfo)
 Creates a throughput object that can be used to measure performance relevant data of connections and servers. More...
 
DECL_EXP RFC_RC SAP_API RfcDestroyThroughput (RFC_THROUGHPUT_HANDLE throughput, RFC_ERROR_INFO *errorInfo)
 Releases all memory used by the throughput object. More...
 
DECL_EXP RFC_RC SAP_API RfcSetThroughputOnConnection (RFC_CONNECTION_HANDLE rfcHandle, RFC_THROUGHPUT_HANDLE throughput, RFC_ERROR_INFO *errorInfo)
 Attaches a throughput object to a connection to be monitored by the throughput object. More...
 
DECL_EXP RFC_THROUGHPUT_HANDLE
SAP_API 
RfcGetThroughputFromConnection (RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO *errorInfo)
 Returns the currently attached throughput object from a connection, if any. More...
 
DECL_EXP RFC_RC SAP_API RfcRemoveThroughputFromConnection (RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO *errorInfo)
 Removes the throughput object from a connection. More...
 
DECL_EXP RFC_RC SAP_API RfcSetThroughputOnServer (RFC_SERVER_HANDLE serverHandle, RFC_THROUGHPUT_HANDLE throughput, RFC_ERROR_INFO *errorInfo)
 Attaches a throughput object to an automated server. More...
 
DECL_EXP RFC_THROUGHPUT_HANDLE
SAP_API 
RfcGetThroughputFromServer (RFC_SERVER_HANDLE serverHandle, RFC_ERROR_INFO *errorInfo)
 Returns the currently attached throughput object from a server, if any. More...
 
DECL_EXP RFC_RC SAP_API RfcRemoveThroughputFromServer (RFC_SERVER_HANDLE serverHandle, RFC_ERROR_INFO *errorInfo)
 Removes the throughput from an automated server. More...
 
DECL_EXP RFC_RC SAP_API RfcResetThroughput (RFC_THROUGHPUT_HANDLE throughput, RFC_ERROR_INFO *errorInfo)
 Resets the data so far collected and aggregated by the throughput object. More...
 
DECL_EXP RFC_RC SAP_API RfcGetNumberOfCalls (RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *numberOfCalls, RFC_ERROR_INFO *errorInfo)
 Returns the cumulated number of calls the throughput object recorded since it was attached or since the last reset. More...
 
DECL_EXP RFC_RC SAP_API RfcGetTotalTime (RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *totalTime, RFC_ERROR_INFO *errorInfo)
 Returns the cumulated time of call durations the throughput object recorded since it was attached or since the last reset. More...
 
DECL_EXP RFC_RC SAP_API RfcGetSerializationTime (RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *serializationTime, RFC_ERROR_INFO *errorInfo)
 Returns the cumulated serializationtime the throughput object recorded since it was attached or since the last reset. More...
 
DECL_EXP RFC_RC SAP_API RfcGetDeserializationTime (RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *deserializationTime, RFC_ERROR_INFO *errorInfo)
 Returns the cumulated deserialization time the throughput object recorded since it was attached or since the last reset. More...
 
DECL_EXP RFC_RC SAP_API RfcGetApplicationTime (RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *applicationTime, RFC_ERROR_INFO *errorInfo)
 Returns the cumulated time of the C implementations of ABAP function modules that the throughput object recorded since it was attached or since the last reset. More...
 
DECL_EXP RFC_RC SAP_API RfcGetServerTime (RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *serverTime, RFC_ERROR_INFO *errorInfo)
 Returns the cumulated execution time of the requests at the server, that the throughput object recorded since it was attached or since the last reset. More...
 
DECL_EXP RFC_RC SAP_API RfcGetNetworkWritingTime (RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *writingTime, RFC_ERROR_INFO *errorInfo)
 Returns the cumulated time that is used to write to network during the requests, that the throughput object recorded since it was attached or since the last reset. More...
 
DECL_EXP RFC_RC SAP_API RfcGetNetworkReadingTime (RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *readingTime, RFC_ERROR_INFO *errorInfo)
 Returns the cumulated time that is used to read from the network during the requests, that the throughput object recorded since it was attached or since the last reset. More...
 
DECL_EXP RFC_RC SAP_API RfcGetSentBytes (RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *sentBytes, RFC_ERROR_INFO *errorInfo)
 Returns the cumulated amount of sent bytes the throughput object recorded since it was attached or since the last reset. More...
 
DECL_EXP RFC_RC SAP_API RfcGetReceivedBytes (RFC_THROUGHPUT_HANDLE throughput, SAP_ULLONG *receivedBytes, RFC_ERROR_INFO *errorInfo)
 Returns the cumulated amount of received bytes the throughput object recorded since it was attached or since the last reset. More...
 

Detailed Description

Functions for creating, destroying and working with throughput objects, which can be used to monitor performance relevant data of connections and servers.

Function Documentation

DECL_EXP RFC_THROUGHPUT_HANDLE SAP_API RfcCreateThroughput ( RFC_ERROR_INFO errorInfo)

Creates a throughput object that can be used to measure performance relevant data of connections and servers.

The created throughput object can be attached to a connection (via RfcSetThroughputOnConnection()) or an automated server (via RfcSetThroughputOnServer()) and will collect performance relevant data from the outgoing or incoming calls. The throughput object will monitor all relevant data until it is removed from the connection or server or the object it is attached to is destroyed, i.e. the connection is closed. Note that only one throughput per connection (or server) is possible. On the contrary one throughput can be attached to many connections (and/or servers). There are serveral functions that handle the throughput and its lifetime like RfcRemoveThroughputFromConnection() or RfcResetThroughput(). Additionally there are RfcGetX functions to obtain the aggregated data from the throughput.

Parameters
[out]*errorInfoError information in case there's not enough memory.
Returns
A handle to the throughput object.
DECL_EXP RFC_RC SAP_API RfcDestroyThroughput ( RFC_THROUGHPUT_HANDLE  throughput,
RFC_ERROR_INFO errorInfo 
)

Releases all memory used by the throughput object.

Warning
Be careful: if you have attached the throughput to a connection (RFC_CONNECTION_HANDLE) or server (RFC_SERVER_HANDLE) you have to remove the throughput from the connection or server before deleting it. Alternatively you can close the connection or shutdown the server before destroying the throughput object.
Parameters
[in]throughputA handle to the throughput object.
[out]*errorInfoNot much that can go wrong here.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetApplicationTime ( RFC_THROUGHPUT_HANDLE  throughput,
SAP_ULLONG *  applicationTime,
RFC_ERROR_INFO errorInfo 
)

Returns the cumulated time of the C implementations of ABAP function modules that the throughput object recorded since it was attached or since the last reset.

This value is collected only in the case of server connections. (In the client case, function modules are of course implemented in ABAP, not in C, and their time is included in the backend time.) If a throughput is attached to several connections or servers, this is the application time of all invoked calls.

Parameters
[in]throughputA handle to the throughput object.
[out]*applicationTimeCumulated time all C impelementations of ABAP function modules took. The unit is milliseconds.
[out]*errorInfoMore details in error case.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetDeserializationTime ( RFC_THROUGHPUT_HANDLE  throughput,
SAP_ULLONG *  deserializationTime,
RFC_ERROR_INFO errorInfo 
)

Returns the cumulated deserialization time the throughput object recorded since it was attached or since the last reset.

If a throughput object is attached to several connections or servers, this is the deserialization time of all processed calls. Deserialization time is defined as the time needed for transforming a byte stream received from the network connection into C/C++ data types that can be used by the application. This includes time needed for codepage conversions, endianness conversions etc., but not the time consumed by reading from the network.

Parameters
[in]throughputA handle to the throughput object.
[out]*deserializationTimeCumulated time all deserialization processes took. The unit is milliseconds.
[out]*errorInfoMore details in error case.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetNetworkReadingTime ( RFC_THROUGHPUT_HANDLE  throughput,
SAP_ULLONG *  readingTime,
RFC_ERROR_INFO errorInfo 
)

Returns the cumulated time that is used to read from the network during the requests, that the throughput object recorded since it was attached or since the last reset.

If a throughput object is attached to several connections or servers, this is the time used to read from the network of all processed calls. The time measures calls to underlying libraries such an NI functions and operating socket functions. Those times might not correctly represent the time that is needed to receive the data, as there are asynchronous IO functions used or the OS is responsible for receiving the data.

Parameters
[in]throughputA handle to the throughput object.
[out]*readingTimeCumulated time spent reading from the network. The unit is milliseconds.
[out]*errorInfoMore details in error case.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetNetworkWritingTime ( RFC_THROUGHPUT_HANDLE  throughput,
SAP_ULLONG *  writingTime,
RFC_ERROR_INFO errorInfo 
)

Returns the cumulated time that is used to write to network during the requests, that the throughput object recorded since it was attached or since the last reset.

If a throughput object is attached to several connections or servers, this is the time used to write to network of all processed calls. The time measures calls to underlying libraries such an NI functions and operating socket functions. Those times might not correctly represent the time that is needed to send the data, as there are asynchronous IO functions used or the OS is responsible for sending the data.

Parameters
[in]throughputA handle to the throughput object.
[out]*writingTimeCumulated time spent writing to the network. The unit is milliseconds.
[out]*errorInfoMore details in error case.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetNumberOfCalls ( RFC_THROUGHPUT_HANDLE  throughput,
SAP_ULLONG *  numberOfCalls,
RFC_ERROR_INFO errorInfo 
)

Returns the cumulated number of calls the throughput object recorded since it was attached or since the last reset.

If a throughput object is attached to several connections or servers, this is the amount of calls that all these connections and servers have processed up to now.

Parameters
[in]throughputA handle to the throughput object.
[out]*numberOfCallsNumber of all monitored calls.
[out]*errorInfoMore details in error case.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetReceivedBytes ( RFC_THROUGHPUT_HANDLE  throughput,
SAP_ULLONG *  receivedBytes,
RFC_ERROR_INFO errorInfo 
)

Returns the cumulated amount of received bytes the throughput object recorded since it was attached or since the last reset.

If a throughput is attached to several connections or servers, this is the amount of bytes received by all processed calls.

Parameters
[in]throughputA handle to the throughput object.
[out]*receivedBytesCumulated amount of bytes received from the network.
[out]*errorInfoMore details in error case.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetSentBytes ( RFC_THROUGHPUT_HANDLE  throughput,
SAP_ULLONG *  sentBytes,
RFC_ERROR_INFO errorInfo 
)

Returns the cumulated amount of sent bytes the throughput object recorded since it was attached or since the last reset.

If a throughput is attached to several connections or servers, this is the amount of bytes sent by all processed calls.

Parameters
[in]throughputA handle to the throughput object.
[out]*sentBytesCumulated amount of bytes sent over the network.
[out]*errorInfoMore details in error case.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetSerializationTime ( RFC_THROUGHPUT_HANDLE  throughput,
SAP_ULLONG *  serializationTime,
RFC_ERROR_INFO errorInfo 
)

Returns the cumulated serializationtime the throughput object recorded since it was attached or since the last reset.

If a throughput object is attached to several connections or servers, this is the serialization time of all processed calls. Serialization time is defined as the time needed for transforming C/C++ data types into a byte stream that can be sent over the network. This includes time needed for codepage conversions, endianness conversions etc., but not the time consumed by writing to the network.

Parameters
[in]throughputA handle to the throughput object.
[out]*serializationTimeCumulated time all serialization processes took. The unit is milliseconds.
[out]*errorInfoMore details in error case.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetServerTime ( RFC_THROUGHPUT_HANDLE  throughput,
SAP_ULLONG *  serverTime,
RFC_ERROR_INFO errorInfo 
)

Returns the cumulated execution time of the requests at the server, that the throughput object recorded since it was attached or since the last reset.

If a throughput object is attached to several connections or servers, this is the server time of all processed calls. This value is measured at the backend by the partner and transmitted in the RFC data payload.

Parameters
[in]throughputA handle to the throughput object.
[out]*serverTimeCumulated time spent at the server side for the requests. The unit is milliseconds.
[out]*errorInfoMore details in error case.
Returns
RFC_RC
DECL_EXP RFC_THROUGHPUT_HANDLE SAP_API RfcGetThroughputFromConnection ( RFC_CONNECTION_HANDLE  rfcHandle,
RFC_ERROR_INFO errorInfo 
)

Returns the currently attached throughput object from a connection, if any.

Returns null if none is attached.

Parameters
[in]rfcHandleA handle to a currently open RFC connection (client or server connection).
[out]*errorInfoMore details in error case.
Returns
A handle to a throughput object.
DECL_EXP RFC_THROUGHPUT_HANDLE SAP_API RfcGetThroughputFromServer ( RFC_SERVER_HANDLE  serverHandle,
RFC_ERROR_INFO errorInfo 
)

Returns the currently attached throughput object from a server, if any.

Returns null if none is attached.

Parameters
[in]serverHandleA handle to the server object.
[out]*errorInfoMore details in error case.
Returns
A handle to a throughput object.
DECL_EXP RFC_RC SAP_API RfcGetTotalTime ( RFC_THROUGHPUT_HANDLE  throughput,
SAP_ULLONG *  totalTime,
RFC_ERROR_INFO errorInfo 
)

Returns the cumulated time of call durations the throughput object recorded since it was attached or since the last reset.

If a throughput object is attached to several connections or servers, this is the total time of all processed calls. This time includes serialization, deserialization, reading from network, writing to network and time consumed in the backend. In case of a server it also includes time accepting a connection. An approximation of the time for transmission and execution in the backend is defined by

totalTime - serializationTime - deserializationTime (- applicationTime)

Parameters
[in]throughputA handle to the throughput object.
[out]*totalTimeCumulated time of all function module calls processed by the corresponding connections or servers. The unit is milliseconds.
[out]*errorInfoMore details in error case.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcRemoveThroughputFromConnection ( RFC_CONNECTION_HANDLE  rfcHandle,
RFC_ERROR_INFO errorInfo 
)

Removes the throughput object from a connection.

The connection will no longer be monitored.

Parameters
[in]rfcHandleA handle to a currently open RFC connection (client or server connection).
[out]*errorInfoMore details in error case.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcRemoveThroughputFromServer ( RFC_SERVER_HANDLE  serverHandle,
RFC_ERROR_INFO errorInfo 
)

Removes the throughput from an automated server.

The server will no longer be monitored.

Parameters
[in]serverHandleA handle to the server from which the throughput shall be detached.
[out]*errorInfoMore details in error case.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcResetThroughput ( RFC_THROUGHPUT_HANDLE  throughput,
RFC_ERROR_INFO errorInfo 
)

Resets the data so far collected and aggregated by the throughput object.

Parameters
[in]throughputA handle to the throughput object.
[out]*errorInfoMore details in error case.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetThroughputOnConnection ( RFC_CONNECTION_HANDLE  rfcHandle,
RFC_THROUGHPUT_HANDLE  throughput,
RFC_ERROR_INFO errorInfo 
)

Attaches a throughput object to a connection to be monitored by the throughput object.

Once attached to a connection, the throughput object will collect data of the function calls invoked via this connection. If there is already another throughput obejct attached to the connection, the old one will be replaced by the given one. The below chart shows a simplified view how the different time measurements apply for a client call.

Client Server (backend) Client

API begin serialization writing server time reading deserialization API return ____________|_______________|_________ _|_____________|_ _________|_________________|____________

Parameters
[in]rfcHandleA handle to a currently open RFC connection (client or server connection).
[in]throughputA handle to the throughput object.
[out]*errorInfoMore details in error case.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetThroughputOnServer ( RFC_SERVER_HANDLE  serverHandle,
RFC_THROUGHPUT_HANDLE  throughput,
RFC_ERROR_INFO errorInfo 
)

Attaches a throughput object to an automated server.

Once attached to a server the throughput object will collect data of the function calls received by this server. As the automated server handles its connections by itself, it will also attach the throughput to all of its connections and to all connections that might be re-opened. If there is already another throughput attached to the server, the old one will be replaced by the given one. The below chart shows a simplified view how the different time measurements apply for a call received by the server.

Client automated Server Client

call begin (accepting) reading deserialization C-application serialization writing call end ____________|_ _____________|_________|_________________|_______________|_______________|_________ _|___________

Parameters
[in]serverHandleA handle to the server object.
[in]throughputA handle to the throughput object.
[out]*errorInfoMore details in error case.
Returns
RFC_RC