public class MiniProfilerModule extends ratpack.guice.ConfigurableModule<MiniProfilerModule.Config>
ProfilerProvider
and an ExecInitializer
to make all executions profiled.
The created ProfilerProvider
is also installed as the default in the MiniProfiler
class for compatibility with code that doesn't use dependency injection or Ratpack contexts.
This does not install handlers to support the UI - you'll need to do that separately in your handler chain configuration.
Modifier and Type | Class and Description |
---|---|
static class |
MiniProfilerModule.Config |
Constructor and Description |
---|
MiniProfilerModule() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
bindDefaultProvider()
Return whether to explicitly bind the default profiler provider.
|
protected void |
configure()
Installs Ratpack / MiniProfiler support code.
|
protected MiniProfilerExecInitializer |
createInitializer(ProfilerProvider provider,
MiniProfilerModule.Config config) |
MiniProfilerExecInitializer |
initializer(ProfilerProvider provider,
MiniProfilerModule.Config config) |
MiniProfilerStartProfilingHandler |
startProfilingHandler(ProfilerProvider provider) |
configure, createConfig, defaultConfig, setConfig
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
protected void configure()
configure
in class com.google.inject.AbstractModule
protected boolean bindDefaultProvider()
Subclasses can return false here to bind their own profiler provider, e.g. using a provides method.
@Provides @Singleton public MiniProfilerExecInitializer initializer(ProfilerProvider provider, MiniProfilerModule.Config config)
@Provides @Singleton public MiniProfilerStartProfilingHandler startProfilingHandler(ProfilerProvider provider)
protected MiniProfilerExecInitializer createInitializer(ProfilerProvider provider, MiniProfilerModule.Config config)