Class WorkloadCPQ
java.lang.Object
dev.roanh.gmark.core.Workload
dev.roanh.gmark.query.conjunct.cpq.WorkloadCPQ
- All Implemented Interfaces:
IDable
Describes a workload of CPQ queries to generate.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
The maximum diameter of the CPQs to generate.private int
The maximum recursive depth of the CPQs to generate. -
Constructor Summary
ConstructorDescriptionWorkloadCPQ
(Element elem, Schema schema) Constructs a new CPQ workload from the given configuration element and graph schema. -
Method Summary
Modifier and TypeMethodDescriptionGets a generator for generating conjuncts according to this workload configuration.int
Gets the maximum diameter of the CPQs to generate.int
Gets the maximum recursive depth of the CPQs to generate.int
Gets the maximum length of paths needed in the selectivity graph to generate queries in accordance with this workload.getType()
Gets the type of this workload.void
setMaxDiameter
(int diameter) Sets the maximum diameter of the CPQs to generate.void
setMaxRecursion
(int recursion) Sets the maximum recursive depth of the CPQs to generate.void
validate()
Validates this workload by checking that all of the arguments are valid and usable for query generation.Methods inherited from class dev.roanh.gmark.core.Workload
addSelectivities, addShapes, generateQueries, generateSingleQuery, getGraphSchema, getID, getMaxArity, getMaxConjuncts, getMinArity, getMinConjuncts, getSelectivities, getShapes, getSize, getStarProbability, removeSelectivities, removeShapes, setMaxArity, setMaxConjuncts, setMinArity, setMinConjuncts, setSize, setStarProbability
-
Field Details
-
maxDiameter
private int maxDiameterThe maximum diameter of the CPQs to generate. -
maxRecursion
private int maxRecursionThe maximum recursive depth of the CPQs to generate.
-
-
Constructor Details
-
WorkloadCPQ
Constructs a new CPQ workload from the given configuration element and graph schema.- Parameters:
elem
- The configuration element to parse.schema
- The graph schema to use.
-
-
Method Details
-
setMaxDiameter
public void setMaxDiameter(int diameter) Sets the maximum diameter of the CPQs to generate.- Parameters:
diameter
- The new maximum diameter.
-
setMaxRecursion
public void setMaxRecursion(int recursion) Sets the maximum recursive depth of the CPQs to generate.- Parameters:
recursion
- The new maximum recursive depth.
-
getMaxDiameter
public int getMaxDiameter()Gets the maximum diameter of the CPQs to generate.- Returns:
- The maximum diameter.
-
getMaxRecursion
public int getMaxRecursion()Gets the maximum recursive depth of the CPQs to generate.- Returns:
- The maximum recursive depth.
-
validate
Description copied from class:Workload
Validates this workload by checking that all of the arguments are valid and usable for query generation. Subclasses should override this method to validate their own arguments.- Overrides:
validate
in classWorkload
- Throws:
IllegalStateException
- When it is determined that the workload is not valid.
-
getType
Description copied from class:Workload
Gets the type of this workload. -
getMaxSelectivityGraphLength
public int getMaxSelectivityGraphLength()Description copied from class:Workload
Gets the maximum length of paths needed in the selectivity graph to generate queries in accordance with this workload.- Specified by:
getMaxSelectivityGraphLength
in classWorkload
- Returns:
- The maximum required selectivity graph path length.
-
getConjunctGenerator
Description copied from class:Workload
Gets a generator for generating conjuncts according to this workload configuration.- Specified by:
getConjunctGenerator
in classWorkload
- Returns:
- A worklaod conjunct generator.
-