/** * Create a new Profiler. * * @param config The Profiler configuration. * @param periodDurationMillis The period duration in milliseconds. * @param profileTimeToLiveMillis The time-to-live of a profile in milliseconds. * @param maxNumberOfRoutes The max number of unique routes to maintain. After this is exceeded, lesser * used routes will be evicted from the internal cache. * @param context The Stellar execution context. */ public StandAloneProfiler(ProfilerConfig config, long periodDurationMillis, long profileTimeToLiveMillis, long maxNumberOfRoutes, Context context) { this.context = context; this.config = config; this.router = new DefaultMessageRouter(context); this.distributor = new DefaultMessageDistributor(periodDurationMillis, profileTimeToLiveMillis, maxNumberOfRoutes); this.clockFactory = new DefaultClockFactory(); this.messageCount = 0; this.routeCount = 0; }
this.messageDistributor = new DefaultMessageDistributor(periodDurationMillis, profileTimeToLiveMillis, maxNumberOfRoutes); this.configurations = new ProfilerConfigurations(); this.activeFlushSignal = new FixedFrequencyFlushSignal(periodDurationMillis);
MessageDistributor distributor = new DefaultMessageDistributor(periodDurationMillis, profileTTLMillis, maxRoutes); Context context = TaskUtils.getContext(globals);