-
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bram Ceulemans
committed
Aug 19, 2021
1 parent
7d0df33
commit 5ed644b
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
spark-api/src/main/java/me/lucko/spark/api/profiler/Profiler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
package me.lucko.spark.api.profiler; | ||
|
||
import org.jetbrains.annotations.Nullable; | ||
|
||
public interface Profiler { | ||
|
||
/** | ||
* Start the Spark Profiler using a profiler configuration. | ||
* A configuration can be built using {@link ProfilerConfiguration#builder()}. | ||
* | ||
* @param configuration the configuration object | ||
* @return if the profiler started successfully | ||
*/ | ||
boolean start(ProfilerConfiguration configuration); | ||
|
||
/** | ||
* Stop the currently running profiler. | ||
* | ||
* @return the profiler report or null if no profiler was running. | ||
*/ | ||
@Nullable | ||
ProfilerReport stop(); | ||
} |