QueryPerformanceCounter

Hi all,
While working on File Sys Filter driver.I got to calculate the performance cost Filter driver
I’m trying using Win32 File IO Api calls
For example. following code is used to test CreateFile call when creating a new file.
QueryPerformanceCounter(&Start_Time);
CreateFile( < appropriate ags …>,);
QueryPerformanceCounter(&End_Time);

Cost = End_TIME - Start_Time;
used this approach to measure ReadFile /WriteFile also.
But it generates inconsistent results. i.e. if run for over 100 files there are huge spikes in chart
interestingly this inconsistency is observed on NTFS also ( i.e. windows fresh installation without any filter drivers).
our idea is to compare results captured on fresh Windows installation
and results captured after the Filter drivers is installed.

I used FileOp utility which is doing it say way and has the same inconsistency.

What is most reliable way to calculate the cost on a Win32 api call other than QueryPerformanceCounter

is there a better and consistent way to analyse performance cost caused by a Filter driver.
Thanks

  • Maneesh

On Thu, 30 Jul 2015, xxxxx@gmail.com wrote:

QueryPerformanceCounter(&Start_Time);
CreateFile( < appropriate ags …>,);
QueryPerformanceCounter(&End_Time);

Cost = End_TIME - Start_Time;
used this approach to measure ReadFile /WriteFile also.
But it generates inconsistent results. i.e. if run for over 100 files there are huge spikes in chart

Then you have proved that your measurements works and everyting is
alright!

Bo Branten

Bo,
Pardon , my sense of humour.
I did not get it well.
If it wont give consistent result , even without my filter driver.
how would I make any statement , if I Filter is fast enough or not.
I have to publish figures to customers , that’s why I am looking for some
reliable.
Thank you in advance.
-Maneesh

On Thu, Jul 30, 2015 at 5:22 PM, Bo Brantén wrote:

> On Thu, 30 Jul 2015, xxxxx@gmail.com wrote:
>
> QueryPerformanceCounter(&Start_Time);
>> CreateFile( < appropriate ags …>,);
>> QueryPerformanceCounter(&End_Time);
>>
>> Cost = End_TIME - Start_Time;
>> used this approach to measure ReadFile /WriteFile also.
>> But it generates inconsistent results. i.e. if run for over 100 files
>> there are huge spikes in chart
>>
>
> Then you have proved that your measurements works and everyting is alright!
>
> Bo Branten
>
>
> —
> NTFSD is sponsored by OSR
>
> OSR is hiring!! Info at http://www.osr.com/careers
>
> For our schedule of debugging and file system seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


मनीष आनंद सामरिया
Maneesh Anand.Samria