Package com._1c.g5.v8.dt.profiling.core
Interface IProfilingService
-
- All Superinterfaces:
IManagedService
public interface IProfilingService extends IManagedService
Profiling service interface. Initiates requests to turn profiling on/off. Clients may addIProfilingResultListener
s that will be notified when new profiling results are available.- Restriction:
- This interface is not intended to be extended by clients.
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addProfilingResultsListener(IProfilingResultListener listener)
AddsIProfilingResultListener
that will be notified when new profiling results are available.void
clear()
Clears current results and notifiesIProfilingResultListener
s about it.List<IProfilingResult>
getResults()
Gets results from cache inIProfilingService
.void
importResults(List<IProfilingResult> results)
Saves all passed results to cache and notifiesIProfilingResultListener
s with the last of them (assuming results are sorted according to dates of profiling sessions).void
removeProfilingResultsListener(IProfilingResultListener listener)
RemovesIProfilingResultListener
from the list of listeners to be notified when new profiling results are available.void
setResultName(IProfilingResult result, String name)
Sets profiling result name.void
toggleProfiling(IProfileTarget target)
Switches profiling mode on if it is off and turns it off if it is on.void
toggleTargetWaitingState(boolean enabled)
Prepares profiling service to turn profiling on/off.-
Methods inherited from interface com._1c.g5.wiring.IManagedService
activate, deactivate
-
-
-
-
Method Detail
-
toggleTargetWaitingState
void toggleTargetWaitingState(boolean enabled)
Prepares profiling service to turn profiling on/off. Must be called beforetoggleProfiling(IProfileTarget)
.- Parameters:
enabled
-true
if profiling is to be enabled,false
otherwise.
-
toggleProfiling
void toggleProfiling(IProfileTarget target)
Switches profiling mode on if it is off and turns it off if it is on.toggleTargetWaitingState(boolean)
must be called before this method.- Parameters:
target
- Profiling target to toggle profiling on/off. Cannot benull
.
-
addProfilingResultsListener
void addProfilingResultsListener(IProfilingResultListener listener)
AddsIProfilingResultListener
that will be notified when new profiling results are available.- Parameters:
listener
- Profiling results listener to be added. Cannot benull
.
-
removeProfilingResultsListener
void removeProfilingResultsListener(IProfilingResultListener listener)
RemovesIProfilingResultListener
from the list of listeners to be notified when new profiling results are available.- Parameters:
listener
- Profiling results listener to be removed. Cannot benull
.
-
getResults
List<IProfilingResult> getResults()
Gets results from cache inIProfilingService
.
WARNING: users should not useIProfilingService.getResults().clear()
as it can break the results listeners. Instead, useclear()
.- Returns:
- Results contained in cache at the moment of call. Never
null
, but can be empty. Notice that some results can contain performance info for different profiling targets (if these targets were profiled during the same profiling session).
-
clear
void clear()
Clears current results and notifiesIProfilingResultListener
s about it.
-
importResults
void importResults(List<IProfilingResult> results)
Saves all passed results to cache and notifiesIProfilingResultListener
s with the last of them (assuming results are sorted according to dates of profiling sessions).- Parameters:
results
- List with results that need to be imported. Cannot benull
.
-
setResultName
void setResultName(IProfilingResult result, String name)
Sets profiling result name.IProfilingResultListener
s will be notified about renaming result.- Parameters:
result
- Result to rename. Cannot benull
.name
- Name to set. Can benull
to reset result name.
-
-