A nice GUI profiler for SqlLite (Profiler released to the public)
almost 6 years 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 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.Â
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.