NAME

grpc_session_info_get_np - Get session information.

SYNOPSIS

grpc_error_t grpc_session_info_get_np(grpc_sessionid_t session_id, grpc_session_info_t_np **info, int *status)

ARGUMENTS

grpc_sessionid_t session_id
The session ID
grpc_session_info_t_np **info
The session information
int *status
The session status

DESCRIPTION

The grpc_session_info_get_np() function returns information on the specified session.

If NULL is specified in info, only the session status is returned as the return value. The storage of session information was allocated in this function. Release the session information by grpc_session_info_release_np() when it becomes unnecessary.

Refer to the following for return status.

GRPC_SESSION_ARG_IS_NOT_TRANSMITTED
Transmission of the arguments to the stub has not been completed.
GRPC_SESSION_EXECUTING
The session is in progress.
GRPC_SESSION_DOWN
The session is not being executed.
GRPC_SESSION_DONE
The session has ended.
GRPC_SESSION_UNKNOWN_STATUS
API was failed.

This function is MT-safe.

Session Information

grpc_session_info_t_np is the structure for storing session information. It is defined in $NG_DIR/include/grpc.h. Its definition is shown below.

typedef struct grpc_session_info_s_np {
    grpc_exec_info_executable_t_np gei_measureExecutable;
    grpc_exec_info_client_t_np     gei_measureClient;

    struct {
        int nElements;
        grpc_compression_info_t_np *toRemote;
        grpc_compression_info_t_np *toClient;
    } gei_compressionInformation;
} grpc_session_info_t_np;

Member name Explanation
gei_measureExecutable Information measured in Ninf-G Executable
gei_measureClient Information measured in Ninf-G Client
gei_compressionInformation Compression information of arguments
gei_compressionInformation.nElements Number of compression information. Its value is number of remote function/remote method arguments.
gei_compressionInformation.toRemote Compression information of arguments transmitted from Ninf-G Client to Ninf-G Executable. This is an array and number of its elements is gei_compressionInformation.nElements.
gei_compressionInformation.toClient Compression information of arguments transmitted from Ninf-G Executable to Ninf-G Client. This is an array and number of its elements is gei_compressionInformation.nElements.

grpc_exec_info_executable_t_np is the structure for storing execution information of Ninf-G Executables. It is defined in $NG_DIR/include/grpc.h. Its definition is shown below.

typedef struct grpc_exec_info_executable_s_np {
    int callbackNtimesCalled;

    struct timeval transferArgumentToRemoteRealTime;
    struct timeval transferArgumentToRemoteCpuTime;

    struct timeval calculationRealTime;
    struct timeval calculationCpuTime;

    struct timeval transferResultToClientRealTime;
    struct timeval transferResultToClientCpuTime;

    struct timeval callbackTransferArgumentToClientRealTime;
    struct timeval callbackTransferArgumentToClientCpuTime;

    struct timeval callbackCalculationRealTime;
    struct timeval callbackCalculationCpuTime;

    struct timeval callbackTransferResultToRemoteRealTime;
    struct timeval callbackTransferResultToRemoteCpuTime;
} grpc_exec_info_executable_t_np;

The explanation about each member of grpc_exec_info_executable_t_np is shown below.
Member name Explanation
callbackNtimesCalled The number of call of callbacks
transferArgumentToRemoteRealTime The time taken for transmitting arguments data from Ninf-G Client to Ninf-G Executable before calculation
transferArgumentToRemoteCpuTime
calculationRealTime The calculation time of remote function/remote method
calculationCpuTime
transferResultToClientRealTime The time taken for transmitting arguments data from Ninf-G Executable to Ninf-G Client after calculation
transferResultToClientCpuTime
callbackTransferArgumentToClientRealTime The time taken for transmitting callback arguments data from Ninf-G Executable to Ninf-G Client before calculation of callback. When callback is called more than one time, this value is the total of each transfer time.
callbackTransferArgumentToClientCpuTime
callbackCalculationRealTime The calculation time of callback. When callback is called more than one time, this value is the total of each calculation time.
callbackCalculationCpuTime
callbackTransferResultToRemoteRealTime The time taken for transmitting callback arguments data from Ninf-G Client to Ninf-G Executable after calculation of callback. When callback is called more than one time, this value is the total of each transfer time.
callbackTransferResultToRemoteCpuTime

Note: The following members are removed in Ninf-G version 5.1.0.


transferFileToRemoteRealTime
transferFileToRemoteCpuTime
transferFileToClientRealTime
transferFileToClientCpuTime

grpc_exec_info_client_t_np is the structure for containing information measured in Ninf-G Client. It is defined in $NG_DIR/include/grpc.h. grpc_exec_info_client_t_np is the structure for storing execution information of Ninf-G Client. It is defined in $NG_DIR/include/grpc.h. Its definition is shown below.

typedef struct grpc_exec_info_client_s_np {
    int callbackNtimesCalled;

    struct timeval remoteMachineInfoRequestRealTime;

    struct timeval remoteClassInfoRequestRealTime;

    struct timeval remoteExecutableInvokeReadTime;

    struct timeval transferArgumentToRemoteRealTime;
    struct timeval transferArgumentToRemoteCpuTime;

    struct timeval calculationRealTime;

    struct timeval transferResultToClientRealTime;
    struct timeval transferResultToClientCpuTime;

    struct timeval callbackTransferArgumentToClientRealTime;
    struct timeval callbackTransferArgumentToClientCpuTime;

    struct timeval callbackCalculationRealTime;
    struct timeval callbackCalculationCpuTime;

    struct timeval callbackTransferResultToRemoteRealTime;
    struct timeval callbackTransferResultToRemoteCpuTime;

} grpc_exec_info_client_t_np;

Member name Explanation
callbackNtimesCalled The number of call of callbacks
remoteMachineInfoRequestRealTime The time taken for getting path of Ninf-G Executable. Ninf-G Client may query to Information Service on getting path. When Ninf-G Client does not query, this value is very small.
remoteClassInfoRequestRealTime The time taken for getting information about remote function/remote object. Ninf-G Client may query to Ninf-G Executable on getting information. When Ninf-G Client does not query, this value is very small.
remoteExecutableInvokeReadTime The time taken for invoking Ninf-G Executable.

Note: This member appeared in Ninf-G 5.x.x.

transferArgumentToRemoteRealTime The time taken for transmitting arguments data from Ninf-G Client to Ninf-G Executable before calculation
transferArgumentToRemoteCpuTime
calculationRealTime The calculation time of remote function/remote method
transferResultToClientRealTime The time taken for transmitting arguments data from Ninf-G Executable to Ninf-G Client after calculation
transferResultToClientCpuTime
callbackTransferArgumentToClientRealTime The time taken for transmitting callback arguments data from Ninf-G Executable to Ninf-G Client before calculation of callback. When callback is called more than one time, this value is the total of each transfer time.
callbackTransferArgumentToClientCpuTime
callbackCalculationRealTime The calculation time of callback. When callback is called more than one time, this value is the total of each calculation time.
callbackCalculationCpuTime
callbackTransferResultToRemoteRealTime The time taken for transmitting callback arguments data from Ninf-G Client to Ninf-G Executable after calculation of callback. When callback is called more than one time, this value is the total of each transfer time.
callbackTransferResultToRemoteCpuTime

Note: The following members are removed in Ninf-G version 5.1.0.

remoteMachineInfoRequestCpuTime
remoteClassInfoRequestCpuTime
gramInvokeRealTime
gramInvokeCpuTime
calculationCpuTime
 

grpc_exec_info_client_t_np is the structure for storing execution information of Ninf-G Client. It is defined in $NG_DIR/include/grpc.h. Its definition is shown below.

typedef struct grpc_compression_info_s_np {
    int         valid;

    size_t      originalNbytes;
    size_t      compressionNbytes;

    struct timeval compressionRealTime;
    struct timeval compressionCpuTime;

    struct timeval decompressionRealTime;
    struct timeval decompressionCpuTime;
} grpc_compression_info_t_np;

Member name Explanation
valid Whether the data in this structure is valid or not. If the data is valid, this value is 1. Otherwise, this value is 0. The data is valid when the argument data is compressed.
originalNbytes The argument data size before compression
compressionNbytes The argument data size after compression
compressionRealTime The time taken for compression
compressionCpuTime
decompressionRealTime The time taken for decompression
decompressionCpuTime

Note: The arguments transfer time in session information is not accurate since communication required by Ninf-G protocol is also included. Argument transfer time measured in Ninf-G Client is more accurate than the time measured in Ninf-G Executable.

RETURN VALUE

If successful, GRPC_NO_ERROR is returned. In the case of an error, Error code is returned.

ERRORS

GRPC_NOT_INITIALIZED
GRPC client is not initialized yet.
GRPC_INVALID_SESSION_ID
Session ID is not valid.
GRPC_OTHER_ERROR_CODE
Internal error detected.

last update : $Date: 2010-04-16 01:09:25 +0900 (金, 16 4月 2010) $