Add profiling middleware