Documentation ¶
Index ¶
- func MarshalAggregation(agg query.Aggregation) (*aggContainer, error)
- func MarshalPredicate(pred query.Predicate) ([]byte, error)
- func MarshalQueries(q []query.Query, config string) ([]byte, error)
- func MarshalQuery(q query.Query) ([]byte, error)
- func UnmarshalAggregation(data aggContainer) (query.Aggregation, error)
- func UnmarshalPredicate(data []byte) (query.Predicate, error)
- func UnmarshalQueries(b []byte) ([]query.Query, string, error)
- func UnmarshalQuery(b []byte) (*query.Query, error)
- type AggregationFactory
- type AggregationFactoryRepo
- func (repo *AggregationFactoryRepo) Exclude(id string)
- func (repo AggregationFactoryRepo) GetAll() []AggregationFactory
- func (repo AggregationFactoryRepo) GetAllIDs() []string
- func (repo AggregationFactoryRepo) GetByID(id string) *AggregationFactory
- func (repo AggregationFactoryRepo) GetChosen() []AggregationFactory
- func (repo *AggregationFactoryRepo) Include(id string) error
- func (repo *AggregationFactoryRepo) SetAll()
- func (repo *AggregationFactoryRepo) SetDefault()
- type ArraySizePredicateFactory
- func (e ArraySizePredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
- func (e ArraySizePredicateFactory) ID() string
- func (factory ArraySizePredicateFactory) IsApplicable(path dataset.DataPath) bool
- func (e ArraySizePredicateFactory) Type() reflect.Type
- type Blacklist
- type BoolEqualityPredicateFactory
- func (e BoolEqualityPredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
- func (e BoolEqualityPredicateFactory) ID() string
- func (factory BoolEqualityPredicateFactory) IsApplicable(path dataset.DataPath) bool
- func (e BoolEqualityPredicateFactory) Type() reflect.Type
- type CountAggregationFactory
- type CountAllAggregationFactory
- func (e CountAllAggregationFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Aggregation
- func (e CountAllAggregationFactory) ID() string
- func (e CountAllAggregationFactory) IsApplicable(p dataset.DataPath) bool
- func (e CountAllAggregationFactory) Type() reflect.Type
- type ExistsPredicateFactory
- type FloatComparisonPredicateFactory
- func (e FloatComparisonPredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
- func (e FloatComparisonPredicateFactory) ID() string
- func (factory FloatComparisonPredicateFactory) IsApplicable(path dataset.DataPath) bool
- func (e FloatComparisonPredicateFactory) Type() reflect.Type
- type Generator
- func (g *Generator) GenerateQuerySet(datasets []dataset.DataSet, num_queries int64) (queries []query.Query)
- func (g *Generator) GenerateQuerySetWithJoda(datasets []dataset.DataSet, num_queries int64, joda_con joda.JodaConnection) ([]query.Query, error)
- func (g *Generator) Network() Network
- func (g *Generator) PrintConfig() string
- func (g *Generator) Statistics() Statistics
- type GroupByAggregationFactory
- func (e GroupByAggregationFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Aggregation
- func (e GroupByAggregationFactory) GenerateWithSubAgg(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand, ...) query.Aggregation
- func (e GroupByAggregationFactory) ID() string
- func (e GroupByAggregationFactory) IsApplicable(p dataset.DataPath) bool
- func (e GroupByAggregationFactory) Type() reflect.Type
- type IntEqualityPredicateFactory
- func (e IntEqualityPredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
- func (e IntEqualityPredicateFactory) ID() string
- func (factory IntEqualityPredicateFactory) IsApplicable(path dataset.DataPath) bool
- func (e IntEqualityPredicateFactory) Type() reflect.Type
- type IsStringPredicateFactory
- type Network
- type NetworkEdge
- type NetworkNode
- type ObjectSizePredicateFactory
- func (e ObjectSizePredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
- func (e ObjectSizePredicateFactory) ID() string
- func (factory ObjectSizePredicateFactory) IsApplicable(path dataset.DataPath) bool
- func (e ObjectSizePredicateFactory) Type() reflect.Type
- type PredicateFactory
- type PredicateFactoryRepo
- func (repo *PredicateFactoryRepo) Exclude(id string)
- func (repo PredicateFactoryRepo) GetAll() []PredicateFactory
- func (repo PredicateFactoryRepo) GetAllIDs() []string
- func (repo PredicateFactoryRepo) GetByID(id string) *PredicateFactory
- func (repo PredicateFactoryRepo) GetChosen() []PredicateFactory
- func (repo *PredicateFactoryRepo) Include(id string) error
- func (repo *PredicateFactoryRepo) SetAll()
- func (repo *PredicateFactoryRepo) SetDefault()
- type Statistics
- type StrEqualityPredicateFactory
- func (e StrEqualityPredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
- func (e StrEqualityPredicateFactory) ID() string
- func (factory StrEqualityPredicateFactory) IsApplicable(path dataset.DataPath) bool
- func (e StrEqualityPredicateFactory) Type() reflect.Type
- type StrPrefixPredicateFactory
- func (e StrPrefixPredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
- func (e StrPrefixPredicateFactory) ID() string
- func (factory StrPrefixPredicateFactory) IsApplicable(path dataset.DataPath) bool
- func (e StrPrefixPredicateFactory) Type() reflect.Type
- type SumAggregationFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalAggregation ¶
func MarshalAggregation(agg query.Aggregation) (*aggContainer, error)
Marshal a aggregation to a re-parsable JSON object
func MarshalPredicate ¶
Marshal a predicate to a re-parsable JSON object
func UnmarshalAggregation ¶
func UnmarshalAggregation(data aggContainer) (query.Aggregation, error)
Unmarshal a aggregation to a re-parsable JSON object
func UnmarshalPredicate ¶
Unmarshal a predicate to a re-parsable JSON object
Types ¶
type AggregationFactory ¶
type AggregationFactory interface { // Checks whether the aggregation can be used on the given dataset IsApplicable(p dataset.DataPath) bool // Generates the aggregation Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Aggregation // Returns the ID/name of the generated aggregation ID() string // Returns the Type of the aggregation Type() reflect.Type }
A AggregationFactory generates a aggregation from a given Datapath
type AggregationFactoryRepo ¶
type AggregationFactoryRepo struct {
// contains filtered or unexported fields
}
func GetAggregationFactoryRepo ¶
func GetAggregationFactoryRepo() AggregationFactoryRepo
func (*AggregationFactoryRepo) Exclude ¶
func (repo *AggregationFactoryRepo) Exclude(id string)
Excludes a AggregationFactory from the list of chosen factories
func (AggregationFactoryRepo) GetAll ¶
func (repo AggregationFactoryRepo) GetAll() []AggregationFactory
Return a list of all aggregations
func (AggregationFactoryRepo) GetAllIDs ¶
func (repo AggregationFactoryRepo) GetAllIDs() []string
Return a list of all aggregation IDs
func (AggregationFactoryRepo) GetByID ¶
func (repo AggregationFactoryRepo) GetByID(id string) *AggregationFactory
Returns a AggregationFactory by ID
func (AggregationFactoryRepo) GetChosen ¶
func (repo AggregationFactoryRepo) GetChosen() []AggregationFactory
Return a list of the chosen aggregations
func (*AggregationFactoryRepo) Include ¶
func (repo *AggregationFactoryRepo) Include(id string) error
Include the Aggregation Factory of the given name
func (*AggregationFactoryRepo) SetAll ¶
func (repo *AggregationFactoryRepo) SetAll()
Sets the chosen aggregations to all available aggregations
func (*AggregationFactoryRepo) SetDefault ¶
func (repo *AggregationFactoryRepo) SetDefault()
Sets the chosen aggregations to the default aggregations (all)
type ArraySizePredicateFactory ¶
type ArraySizePredicateFactory struct { }
Array Size
func (ArraySizePredicateFactory) Generate ¶
func (e ArraySizePredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
Generates the predicate
func (ArraySizePredicateFactory) ID ¶
func (e ArraySizePredicateFactory) ID() string
func (ArraySizePredicateFactory) IsApplicable ¶
func (factory ArraySizePredicateFactory) IsApplicable(path dataset.DataPath) bool
func (ArraySizePredicateFactory) Type ¶
func (e ArraySizePredicateFactory) Type() reflect.Type
type BoolEqualityPredicateFactory ¶
type BoolEqualityPredicateFactory struct { }
Bool Equality
func (BoolEqualityPredicateFactory) Generate ¶
func (e BoolEqualityPredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
Generates the predicate
func (BoolEqualityPredicateFactory) ID ¶
func (e BoolEqualityPredicateFactory) ID() string
func (BoolEqualityPredicateFactory) IsApplicable ¶
func (factory BoolEqualityPredicateFactory) IsApplicable(path dataset.DataPath) bool
func (BoolEqualityPredicateFactory) Type ¶
func (e BoolEqualityPredicateFactory) Type() reflect.Type
type CountAggregationFactory ¶
type CountAggregationFactory struct { }
func (CountAggregationFactory) Generate ¶
func (e CountAggregationFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Aggregation
Generates the aggregation
func (CountAggregationFactory) ID ¶
func (e CountAggregationFactory) ID() string
func (CountAggregationFactory) IsApplicable ¶
func (e CountAggregationFactory) IsApplicable(p dataset.DataPath) bool
Checks wether the aggregation can be used on the given dataset
func (CountAggregationFactory) Type ¶
func (e CountAggregationFactory) Type() reflect.Type
type CountAllAggregationFactory ¶
type CountAllAggregationFactory struct { }
func (CountAllAggregationFactory) Generate ¶
func (e CountAllAggregationFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Aggregation
Generates the aggregation
func (CountAllAggregationFactory) ID ¶
func (e CountAllAggregationFactory) ID() string
func (CountAllAggregationFactory) IsApplicable ¶
func (e CountAllAggregationFactory) IsApplicable(p dataset.DataPath) bool
Checks wether the aggregation can be used on the given dataset
func (CountAllAggregationFactory) Type ¶
func (e CountAllAggregationFactory) Type() reflect.Type
type ExistsPredicateFactory ¶
type ExistsPredicateFactory struct { }
func (ExistsPredicateFactory) Generate ¶
func (e ExistsPredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
Generates the predicate
func (ExistsPredicateFactory) ID ¶
func (e ExistsPredicateFactory) ID() string
func (ExistsPredicateFactory) IsApplicable ¶
func (e ExistsPredicateFactory) IsApplicable(p dataset.DataPath) bool
Checks wether the predicate can be used on the given dataset
func (ExistsPredicateFactory) Type ¶
func (e ExistsPredicateFactory) Type() reflect.Type
type FloatComparisonPredicateFactory ¶
type FloatComparisonPredicateFactory struct { }
FloatComparison
func (FloatComparisonPredicateFactory) Generate ¶
func (e FloatComparisonPredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
Generates the predicate
func (FloatComparisonPredicateFactory) ID ¶
func (e FloatComparisonPredicateFactory) ID() string
func (FloatComparisonPredicateFactory) IsApplicable ¶
func (factory FloatComparisonPredicateFactory) IsApplicable(path dataset.DataPath) bool
func (FloatComparisonPredicateFactory) Type ¶
func (e FloatComparisonPredicateFactory) Type() reflect.Type
type Generator ¶
type Generator struct { // The minimum selectivity each query should have MinSelectivity float64 // The maximum selectivity each query should have MaxSelectivity float64 // Maximum chained AND/OR predicates MaxChain int // Maximum tries to roll valid query parts MaxTries int // Probability to randomly browse to a new node RandomBrowseProb float64 // Probability to go back to previous node GoBackProb float64 // Predicates to use in Generator Predicates []PredicateFactory // Aggregations to use in Generator Aggregations []AggregationFactory // Probability to perform an aggregation AggregationProb float64 // Weighted path choosing WeightedPaths bool // Blacklist Blacklists map[string]*Blacklist // contains filtered or unexported fields }
func (*Generator) GenerateQuerySet ¶
func (g *Generator) GenerateQuerySet(datasets []dataset.DataSet, num_queries int64) (queries []query.Query)
Returns a full benchmark query set
func (*Generator) GenerateQuerySetWithJoda ¶
func (g *Generator) GenerateQuerySetWithJoda(datasets []dataset.DataSet, num_queries int64, joda_con joda.JodaConnection) ([]query.Query, error)
Returns a full benchmark query set. Each query is tested against the JODA backend
func (*Generator) PrintConfig ¶
Returns the config as a string
func (*Generator) Statistics ¶
func (g *Generator) Statistics() Statistics
Returns execution Statistics
type GroupByAggregationFactory ¶
type GroupByAggregationFactory struct { }
func (GroupByAggregationFactory) Generate ¶
func (e GroupByAggregationFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Aggregation
Generates the aggregation
func (GroupByAggregationFactory) GenerateWithSubAgg ¶
func (e GroupByAggregationFactory) GenerateWithSubAgg(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand, subAgg query.Aggregation) query.Aggregation
func (GroupByAggregationFactory) ID ¶
func (e GroupByAggregationFactory) ID() string
func (GroupByAggregationFactory) IsApplicable ¶
func (e GroupByAggregationFactory) IsApplicable(p dataset.DataPath) bool
Checks wether the aggregation can be used on the given dataset
func (GroupByAggregationFactory) Type ¶
func (e GroupByAggregationFactory) Type() reflect.Type
type IntEqualityPredicateFactory ¶
type IntEqualityPredicateFactory struct { }
IntEquality
func (IntEqualityPredicateFactory) Generate ¶
func (e IntEqualityPredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
Generates the predicate
func (IntEqualityPredicateFactory) ID ¶
func (e IntEqualityPredicateFactory) ID() string
func (IntEqualityPredicateFactory) IsApplicable ¶
func (factory IntEqualityPredicateFactory) IsApplicable(path dataset.DataPath) bool
func (IntEqualityPredicateFactory) Type ¶
func (e IntEqualityPredicateFactory) Type() reflect.Type
type IsStringPredicateFactory ¶
type IsStringPredicateFactory struct { }
IsString
func (IsStringPredicateFactory) Generate ¶
func (e IsStringPredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
Generates the predicate
func (IsStringPredicateFactory) ID ¶
func (e IsStringPredicateFactory) ID() string
func (IsStringPredicateFactory) IsApplicable ¶
func (e IsStringPredicateFactory) IsApplicable(p dataset.DataPath) bool
Checks wether the predicate can be used on the given dataset
func (IsStringPredicateFactory) Type ¶
func (e IsStringPredicateFactory) Type() reflect.Type
type Network ¶
type Network struct { Nodes map[string]NetworkNode Edges []NetworkEdge MaxTimestamp uint }
type NetworkEdge ¶
type NetworkNode ¶
type ObjectSizePredicateFactory ¶
type ObjectSizePredicateFactory struct { }
func (ObjectSizePredicateFactory) Generate ¶
func (e ObjectSizePredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
Generates the predicate
func (ObjectSizePredicateFactory) ID ¶
func (e ObjectSizePredicateFactory) ID() string
func (ObjectSizePredicateFactory) IsApplicable ¶
func (factory ObjectSizePredicateFactory) IsApplicable(path dataset.DataPath) bool
func (ObjectSizePredicateFactory) Type ¶
func (e ObjectSizePredicateFactory) Type() reflect.Type
type PredicateFactory ¶
type PredicateFactory interface { // Checks whether the predicate can be used on the given dataset IsApplicable(p dataset.DataPath) bool // Generates the predicate Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate // Returns the ID/name of the generated predicate ID() string // Returns the Type of the predicate Type() reflect.Type }
A PredicateFactory generates a predicate from a given Datapath
type PredicateFactoryRepo ¶
type PredicateFactoryRepo struct {
// contains filtered or unexported fields
}
func GetPredicateFactoryRepo ¶
func GetPredicateFactoryRepo() PredicateFactoryRepo
func (*PredicateFactoryRepo) Exclude ¶
func (repo *PredicateFactoryRepo) Exclude(id string)
Excludes a PredicateFactory from the list of chosen factories
func (PredicateFactoryRepo) GetAll ¶
func (repo PredicateFactoryRepo) GetAll() []PredicateFactory
Return a list of all predicates
func (PredicateFactoryRepo) GetAllIDs ¶
func (repo PredicateFactoryRepo) GetAllIDs() []string
Return a list of all predicate IDs
func (PredicateFactoryRepo) GetByID ¶
func (repo PredicateFactoryRepo) GetByID(id string) *PredicateFactory
Returns a PredicateFactory by ID
func (PredicateFactoryRepo) GetChosen ¶
func (repo PredicateFactoryRepo) GetChosen() []PredicateFactory
Return a list of the chosen predicates
func (*PredicateFactoryRepo) Include ¶
func (repo *PredicateFactoryRepo) Include(id string) error
Include the Predicate Factory of the given name
func (*PredicateFactoryRepo) SetAll ¶
func (repo *PredicateFactoryRepo) SetAll()
Sets the chosen predicates to all available predicates
func (*PredicateFactoryRepo) SetDefault ¶
func (repo *PredicateFactoryRepo) SetDefault()
Sets the chosen predicates to the default predicates (all)
type Statistics ¶
type StrEqualityPredicateFactory ¶
type StrEqualityPredicateFactory struct { }
func (StrEqualityPredicateFactory) Generate ¶
func (e StrEqualityPredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
Generates the predicate
func (StrEqualityPredicateFactory) ID ¶
func (e StrEqualityPredicateFactory) ID() string
func (StrEqualityPredicateFactory) IsApplicable ¶
func (factory StrEqualityPredicateFactory) IsApplicable(path dataset.DataPath) bool
func (StrEqualityPredicateFactory) Type ¶
func (e StrEqualityPredicateFactory) Type() reflect.Type
type StrPrefixPredicateFactory ¶
type StrPrefixPredicateFactory struct { }
String Prefix
func (StrPrefixPredicateFactory) Generate ¶
func (e StrPrefixPredicateFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Predicate
Generates the predicate
func (StrPrefixPredicateFactory) ID ¶
func (e StrPrefixPredicateFactory) ID() string
func (StrPrefixPredicateFactory) IsApplicable ¶
func (factory StrPrefixPredicateFactory) IsApplicable(path dataset.DataPath) bool
func (StrPrefixPredicateFactory) Type ¶
func (e StrPrefixPredicateFactory) Type() reflect.Type
type SumAggregationFactory ¶
type SumAggregationFactory struct { }
func (SumAggregationFactory) Generate ¶
func (e SumAggregationFactory) Generate(p dataset.DataPath, blacklist *Blacklist, ranGen *rand.Rand) query.Aggregation
Generates the aggregation
func (SumAggregationFactory) ID ¶
func (e SumAggregationFactory) ID() string
func (SumAggregationFactory) IsApplicable ¶
func (e SumAggregationFactory) IsApplicable(p dataset.DataPath) bool
Checks wether the aggregation can be used on the given dataset
func (SumAggregationFactory) Type ¶
func (e SumAggregationFactory) Type() reflect.Type