A nice GUI profiler for SqlLite (Profiler released to the public)

11 months ago

We have decided to release our profiler tool to the public on terms similar to the Microsoft resource kit.

So, you are free to use it, but you get no warranty or support what so ever.

The knowledge base article is here (search for “dotnet Profiler”). The actual MSI is here .

The installer will create a directory which contains the profiler executable and some samples.

It turns out it is trivial to amend the Sqlite.Net library to contain SQL profiling. 

SqliteProfiler

 

It is a simple 2 line modification to the library, I added a using block around the Step method in Sqlite3.cs (and I added a reference to Altiris.Profiling.DLL from the library)

using (SqlProfiler profiler = SqlProfiler.StartProfiling(“sqlite”, stmt._sqlStatement))
{
   // old Step code here

}

This is a very basic proof of concept, to complete the instrumentation we need to

  • Put some smarts in so Sqlite.Net will still work even if Altiris.Profiling.DLL is not installed. (detect and store in a static)
  • Put in sub operations for the various commands. So we can track total number of readers, executenonquerey etc. without tracking individual statements.
  • Substitute the command params and return values into the profiling block. (Instead of ”Insert into A values (@a)” show “Insert into A values (1)”)
  • Add in the filename for the database, instead of the hard coded “sqlite” string.

Comments

cowgaR

8 months ago

any news on new profiler version?

sam

7 months ago

cowgaR,

A new profiler version is completely out of my control, the project is owned by Symantec ... I no longer work for Symantec.

Are you using Profiler?

Simon

11 months ago

Hey Sam, nice blog!

Nice to see a profiler that's similar to the one you wrote for NS. Great job.

.Net Adventures

11 months ago

I can't download the MSI,the link that you provided returns a blank page instead.

sam

11 months ago

Ok, I fixed up that link

sam

11 months ago

Fixed up the link

Comments Closed.