IMO this implementation is somewhat a smell. Shouldn't this SQL generation stuff be abstracted and encapsulated into separate classes? Something like `AbstractProfilerSQLGenerator` and then `SQLServerProfilerSQLGenerator` etc. A factory could serve the appropriate instance for a given platform then (just an idea). This would be a lot cleaner IMO.