public final class RunLoadCounter extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RunLoadCounter.Marker
Used internally.
|
static class |
RunLoadCounter.MarkerAdder
Used internally.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
assertMaxLoads(hudson.model.AbstractProject<?,?> project,
int max,
Callable<T> thunk)
Asserts that at most a certain number of build records are loaded as a result of some task.
|
static int |
countLoads(hudson.model.AbstractProject<?,?> project,
Runnable thunk)
Counts how many build records are loaded as a result of some task.
|
static void |
prepare(hudson.model.AbstractProject<?,?> project)
Prepares a new project to be measured.
|
public static void prepare(hudson.model.AbstractProject<?,?> project)
throws IOException
project - a project of any kindIOException - if preparations failpublic static int countLoads(hudson.model.AbstractProject<?,?> project,
Runnable thunk)
project - a project on which prepare(hudson.model.AbstractProject<?, ?>) was called prior to creating buildsthunk - a task which is expected to load some build recordspublic static <T> T assertMaxLoads(hudson.model.AbstractProject<?,?> project,
int max,
Callable<T> thunk)
throws Exception
T - the return value typeproject - a project on which prepare(hudson.model.AbstractProject<?, ?>) was called prior to creating buildsmax - the maximum number of build records we expect to loadthunk - a task which is expected to load some build recordsException - if the task failedAssertionError - if one more than max build record is loadedCopyright © 2004-2014. All Rights Reserved.