getServerCPUTime() Method
Returns the server CPU time for the result set fetches.
Returns
The server CPU time for the result set fetches, in microseconds. This value does not include network communication time.
Remarks
The returned value is for the fetches since the beginning of the current result set. If nextResult is called, then the returned result is reset for the new result set.
By default, executed statements include server CPU time for the first 32 rows. If fetching more rows requires additional fetch requests to the server, then the server CPU time value is a non-zero value and calculated from the beginning of the current result set.
Example
Connect to the SAP HANA database:
var hana=require('@sap/hana-client');
var conn=hana.createConnection();
conn.connect("serverNode=myserver;uid=<user-id>;pwd=<password>");
Run the following statement with the getServerCPUTime() method to retrieve the server CPU time for the fetch requests (not including the execute server CPU time):
var sql = "SELECT TOP 100 * FROM OBJECTS";
var stmt = conn.prepare(sql);
var result_set = stmt.execQuery();
var rows = [];
while (result_set.next()) {
rows.push(result_set.getValues());
}
var cpuTime = result_set.getServerCPUTime();