|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvnet.hudson.test.RunLoadCounter
public final class RunLoadCounter
Utility to determine when a build record is loaded.
| Nested Class Summary | |
|---|---|
static class |
RunLoadCounter.Marker
Used internally. |
static class |
RunLoadCounter.MarkerAdder
Used internally. |
| Method Summary | ||
|---|---|---|
static
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void prepare(hudson.model.AbstractProject<?,?> project)
throws IOException
project - a project of any kind
IOException - if preparations fail
public 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 records
public 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 records
Exception - if the task failed
AssertionError - if one more than max build record is loaded
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||