0

stopwatch like ability in TRACE

barak 4 years ago 0

Instead of having Stopwatch instances in my code to measure execution time between parts in code, to have the TRACE feature the ability to assist me in that.

i.e. when adding a trace point, in addition to specifying an expression to print,

could give it stopwatch abilities, such as specifying the watch NAME/ID and define if it's:

START (start/restart a stopwatch. if was already started then print out ellapsed time and restart)

STOP (stop measuring and print out the elapped time)

PRINT (just to print out the elapped time so far)


the new ability could either be as additional UI controls (Textbox, radio-button/combo) near the expression textbox

or maybe speciall place-holders in the expression itself. (suggested syntax is... just a suggestion)

e.g. trace expressions:

Calling CalcAndVerifyHash on {n} items ${start-watch:CalcHash}

Verifying hash on {n} items (Calc phase took ${print-watch:CalcHash})

CalcAndVerifyHash on {n} items took ${stop-watch:CalcHash}

trace window:

Calling CalcAndVerifyHash on 9999 items

Verifying hash on 9999 items (Calc phase took 00:00:15.300)

Finished CalcAndVerifyHash on 999. it took 00:00:25.515



thanks