Class QueryTest
- java.lang.Object
-
- uk.gov.gchq.gaffer.performancetesting.query.QueryTest
-
public class QueryTest extends Object
This class measures the time taken to query for a given number ofElementSeed
s. The query is broken up into batches of a user specified size. For every batch, the number of seeds queried for per second and the number of results returned per second are recorded.The test is configured using a
QueryTestProperties
. This specifies the class to be used to generate the random seeds and the number of seeds to be queried for.Optionally, a
MetricsListener
can be provided. This will receive an update of the performance at the end of every batch. This update is an instance ofQueryMetrics
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QueryTest.ElementIdSupplierFactory
-
Constructor Summary
Constructors Constructor Description QueryTest(uk.gov.gchq.gaffer.graph.Graph graph, QueryTestProperties testProperties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
double
run()
Runs a test of querying for the seeds in batches.
-
-
-
Constructor Detail
-
QueryTest
public QueryTest(uk.gov.gchq.gaffer.graph.Graph graph, QueryTestProperties testProperties)
-
-
Method Detail
-
run
public double run()
Runs a test of querying for the seeds in batches.- Returns:
- The rate at which seeds were queried for (number of seeds per second).
-
main
public static void main(String[] args)
-
-