I need to get time taken to execute the GSQL
query in TigerGraph
, but the problem is the unit is in seconds
and since the actual time taken is less than a second it always returns as 0, I need a way to change the unit to milliseconds.
Here is the Query I have
CREATE QUERY time() FOR GRAPH nyGraph {
DATETIME before;
before = now();
/* my query logic */
PRINT (datetime_to_epoch(now()) - datetime_to_epoch(before)) as epoch; /* gives 0 */
PRINT datetime_diff(now(), before) as time; /* gives 0 */
}
Output:
[
{
/* Query Results */
},
{
"epoch": 0
},
{
"time": 0
}
]