Class QueryTest


  • public class QueryTest
    extends Object
    This class measures the time taken to query for a given number of ElementSeeds. 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 of QueryMetrics.

    • 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)