Influxdb 如何计算DolphinDB中sql代码的运行时间

Influxdb 如何计算DolphinDB中sql代码的运行时间,influxdb,dolphindb,Influxdb,Dolphindb,我想计算DolphinDB GUI中矩阵乘法运算的运行时间 x=rand(1.0, 1000000).reshape(1000 : 1000) y=rand(1.0, 1000000).reshape(1000 : 1000) x**y 我尝试了下面的功能计时器 x=rand(1.0, 1000000).reshape(1000 : 1000) y=rand(1.0, 1000000).reshape(1000 : 1000) tm =timer(x**y) assert 1,tm <

我想计算DolphinDB GUI中矩阵乘法运算的运行时间

x=rand(1.0, 1000000).reshape(1000 : 1000)
y=rand(1.0, 1000000).reshape(1000 : 1000)
x**y
我尝试了下面的功能计时器

x=rand(1.0, 1000000).reshape(1000 : 1000)
y=rand(1.0, 1000000).reshape(1000 : 1000)
tm =timer(x**y)
assert 1,tm < 2000000000
2019-05-10T17:37:00.359: execution was completed with exception
Syntax Error: [line #3] Cannot recognize the function name timer

如何获取运行时间?

计时器是一条语句,而不是DolphindB中的函数。要计算运行时间并分配给变量,请使用
now
函数

x=rand(1.0, 1000000).reshape(1000 : 1000)
y=rand(1.0, 1000000).reshape(1000 : 1000)
start = now()
x**y
tm = now() - start
x=rand(1.0, 1000000).reshape(1000 : 1000)
y=rand(1.0, 1000000).reshape(1000 : 1000)
start = now(true)
x**y
tm = now(true) - start
时间精度为毫秒。如果要获得纳秒精度,请将
now
函数的可选参数设置为true

x=rand(1.0, 1000000).reshape(1000 : 1000)
y=rand(1.0, 1000000).reshape(1000 : 1000)
start = now()
x**y
tm = now() - start
x=rand(1.0, 1000000).reshape(1000 : 1000)
y=rand(1.0, 1000000).reshape(1000 : 1000)
start = now(true)
x**y
tm = now(true) - start