I am doing some performance measurements in VBScript. I want to measure how fast my algorithm works
t1 = Now()
doAlotOfWork ()
t2 = Now()
MsgBox "Operation took " & DateDiff ("s", t1, t2) & " seconds."
It gives me time in seconds. If one algorithm leads to 1 second of execution, and the other after 2 seconds, this is unlikely to give me useful information. I need to blow up the size of the problem before it takes a minute to complete.
Does anyone know a way to make such measurements in VBScript, but then finer-grained. Something that introduces milliseconds, for example.
I have a feeling that there should be a solution in WMI.
source
share