Package com._1c.g5.v8.dt.profiling.core
Interface IResultsStore
-
public interface IResultsStore
Loads and saves results that are stored.
Results are stored in metadata of profiling plugin.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<IProfilingResult>
loadResults(Path path)
Loads results from the specified directory.void
saveResult(IProfilingResult result, Path path)
Saves a single result to the specified directory.void
saveResults(List<IProfilingResult> results, Path path)
Saves results to the specified directory.
-
-
-
Method Detail
-
saveResults
void saveResults(List<IProfilingResult> results, Path path)
Saves results to the specified directory.path
should specify an existing directory. If the directory does not exist orpath
identifies a file, then the exception is thrown.
If thepath
identifies an existing directory, then the results are saved in it without clearing the directory.
If any of passed profiling result is named, then it will be stored in directory with the same name. Otherwise it will be stored in directory with the name being the string representation of result UUID.
If the name of created directory for any result conflicts with the name of any folders contained in the directory to save result into, then that result will be saved in that folder and the files contained in that folder will remain untouched (unless they are named like the storage files; in that case they will be overwritten).- Parameters:
results
- List with results to be saved. Cannot benull
.path
- Path specifying a directory to save results to. Cannot benull
and should specify an existing directory.- Throws:
NullPointerException
- if any of arguments isnull
.IllegalArgumentException
- if the specified path defines a file instead of directory or directory that does not exist.
-
saveResult
void saveResult(IProfilingResult result, Path path)
Saves a single result to the specified directory.path
should specify an existing directory. If the directory does not exist orpath
identifies a file, then the exception is thrown.
If thepath
identifies an existing directory, then the results are saved in it without clearing the directory.
Ifresult
is named, then it will be stored in directory with the same name. Otherwise it will be stored in directory with the name being the string representation of its UUID.
If the name of created directory conflicts with the name of any folders contained in the directory to save result into, then result will be saved in that folder and the files contained in that folder will remain untouched (unless they are named like the storage files; in that case they will be overwritten).- Parameters:
results
- Result to be saved. Cannot benull
.path
- Path specifying a directory to save result to. Cannot benull
and should specify an existing directory.- Throws:
NullPointerException
- if any of arguments isnull
.IllegalArgumentException
- if the specified path defines a file instead of directory or directory that does not exist.
-
loadResults
List<IProfilingResult> loadResults(Path path)
Loads results from the specified directory.path
should specify an existing directory. If the directory does not exist orpath
identifies a file, then the exception is thrown. Results in returned list are sorted by date of profiling sessions.- Parameters:
path
- Path specifying a directory to load results from. Cannot benull
and should specify an existing directory.- Returns:
- List with results loaded from the specified path. Never
null
, but can be empty if no results are found in directory. - Throws:
NullPointerException
- if specified path isnull
.IllegalArgumentException
- if the specified path defines a file instead of directory or directory that does not exist.
-
-