The execution time of the last statement

Hi,How to find out the execution time of the last statement in kdb+?Thanks,Sayan

X-Mailer: Apple Mail (2.930.3)to time an expression use \tif you want to keep track of it within your application you’ll have to do the usual sort of trick with keeping .z.z before and after\t exprhttps://code.kx.com/trac/wiki/QforMortals2/ commands_and_system_variables#ElapsedTimetexprOn 29.04.2009, at 13:50, Sayanosauras wrote:>> Hi,>> How to find out the execution time of the last statement in kdb+?>> Thanks,> Sayan

Thanks Simon. But \t expr is giving 0 for me even if I set the timerto \t 1000. I did:q)\t 1000q)\t select from value `bondtable0Am I doing something wrong? .z.z appears to be fine, but that’s amanual process.SayanOn Apr 29, 4:54?pm, Simon Garland <simon.garl…> wrote:> to time an expression use \t> if you want to keep track of it within your application you’ll have to ?> do the usual sort of trick with keeping .z.z before and after>> \t expr>> https://code.kx.com/trac/wiki/QforMortals2/&gt; commands_and_system_variables#ElapsedTimetexpr>> On 29.04.2009, at 13:50, Sayanosauras wrote:>>>> > Hi,>> > How to find out the execution time of the last statement in kdb+?>> > Thanks,> > Sayan</simon.garl…>

X-Mailer: Apple Mail (2.930.3)put the expression in a loop if it takes less than 1 ms:\t do[1000;expr]divide the result to 1000 after that.On 30 Apr 2009, at 12:00, Sayanosauras wrote:>> Thanks Simon. But \t expr is giving 0 for me even if I set the timer> to \t 1000. I did:>> q)\t 1000> q)\t select from value `bondtable> 0>> Am I doing something wrong? .z.z appears to be fine, but that’s a> manual process.>> Sayan>> On Apr 29, 4:54 pm, Simon Garland <simon.garl…> wrote:>> to time an expression use \t>> if you want to keep track of it within your application you’ll have >> to>> do the usual sort of trick with keeping .z.z before and after>>>> \t expr>>>> https://code.kx.com/trac/wiki/QforMortals2/&gt;&gt; commands_and_system_variables#ElapsedTimetexpr>>>> On 29.04.2009, at 13:50, Sayanosauras wrote:>>>>>>>>> Hi,>>>>> How to find out the execution time of the last statement in kdb+?>>>>> Thanks,>>> Sayan> ></simon.garl…>

X-Mailer: Apple Mail (2.930.3)you’re mixing two things here\t 1000sets the timer even .z.ts to happen every 1000 mshttps://code.kx.com/trac/wiki/Reference/dotzdottswhen you do\t select from valuebondtable(why not select from bondtable ?)you're timing one run of the selectdepending on the size of bondtable and the OS timer granularity that may be too small to measuretry something like\t do[1000;select from bondtable]On 30.04.2009, at 11:00, Sayanosauras wrote:\>\> Thanks Simon. But \t expr is giving 0 for me even if I set the timer\> to \t 1000. I did:\>\> q)\t 1000\> q)\t select from value bondtable> 0>> Am I doing something wrong? .z.z appears to be fine, but that’s a> manual process.>> Sayan>> On Apr 29, 4:54 pm, Simon Garland <simon.garl…> wrote:>> to time an expression use \t>> if you want to keep track of it within your application you’ll have >> to>> do the usual sort of trick with keeping .z.z before and after>>>> \t expr>>>> https://code.kx.com/trac/wiki/QforMortals2/&gt;&gt; commands_and_system_variables#ElapsedTimetexpr>>>> On 29.04.2009, at 13:50, Sayanosauras wrote:>>>>>>>>> Hi,>>>>> How to find out the execution time of the last statement in kdb+?>>>>> Thanks,>>> Sayan</simon.garl…>

Yes now I get that \t is for setting the timer, the clock will tickafter so many secs…thanks I have got what I wanted. Thanks Felixand Simon.SayanOn Apr 30, 2:11?pm, Simon Garland <simon.garl…> wrote:> you’re mixing two things here> \t 1000> sets the timer even .z.ts to happen every 1000 mshttps://code.kx.com/trac/wiki/Reference/dotzdotts>> when you do> \t select from valuebondtable&gt; (why not select from bondtable ?)&gt; you're timing one run of the select&gt; depending on the size of bondtable and the OS timer granularity that ?&gt; may be too small to measure&gt; try something like&gt;&gt; \t do[1000;select from bondtable]&gt;&gt; On 30.04.2009, at 11:00, Sayanosauras wrote:&gt;&gt;&gt;&gt; &gt; Thanks Simon. But \t expr is giving 0 for me even if I set the timer&gt; &gt; to \t 1000. I did:&gt;&gt; &gt; q)\t 1000&gt; &gt; q)\t select from value bondtable> > 0>> > Am I doing something wrong? .z.z appears to be fine, but that’s a> > manual process.>> > Sayan>> > On Apr 29, 4:54 pm, Simon Garland <simon.garl…> wrote:> >> to time an expression use \t> >> if you want to keep track of it within your application you’ll have ?> >> to> >> do the usual sort of trick with keeping .z.z before and after>> >> \t expr>> >>https://code.kx.com/trac/wiki/QforMortals2/&gt; >> commands_and_system_variables#ElapsedTimetexpr>> >> On 29.04.2009, at 13:50, Sayanosauras wrote:>> >>> Hi,>> >>> How to find out the execution time of the last statement in kdb+?>> >>> Thanks,> >>> Sayan</simon.garl…></simon.garl…>