Documentation ¶
Index ¶
- func ExecuteComparison(file1, file2 string) error
- func ExecuteIngest(m *Main) error
- func ExecuteQueries(m *Main) error
- func NewCompareCommand(m *Main) *cobra.Command
- func NewIngestCommand(m *Main) *cobra.Command
- func NewQueryCommand(m *Main) *cobra.Command
- func NewRootCmd() *cobra.Command
- type Benchmark
- type Comparison
- type FieldSpec
- type IndexSpec
- type Main
- type Query
- type TimeDuration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteComparison ¶
ExecuteComparison executes a comparison on the two files.
func ExecuteIngest ¶
ExecuteIngest executes an ingest command on the cluster/s, ensuring that the order of clusters specified in the flags corresponds to the filenames that the results are saved in.
func ExecuteQueries ¶
ExecuteQueries executes queries on the cluster/s.
func NewCompareCommand ¶
NewCompareCommand initializes a new compare command for dx.
func NewIngestCommand ¶
NewIngestCommand initializes an ingest command.
func NewQueryCommand ¶
NewQueryCommand initializes a query command.
func NewRootCmd ¶
NewRootCmd creates an instance of the cobra root command for dx.
Types ¶
type Benchmark ¶
type Benchmark struct { Type string `json:"type"` Time TimeDuration `json:"time"` ThreadCount int `json:"threadcount"` Query *Query `json:"query,omitempty"` }
Benchmark contains the information related to an ingest or query benchmark.
func NewBenchmark ¶
func NewBenchmark() *Benchmark
NewBenchmark creates an empty benchmark of type cmdType.
type Comparison ¶
type Comparison struct { Type string RunTime1 time.Duration RunTime2 time.Duration RunTimeDelta float64 TotalTime1 time.Duration TotalTime2 time.Duration TotalTimeDelta float64 ThreadCount1 int ThreadCount2 int Accuracy float64 Size int64 }
Comparison struct contains the information of a comparison. RunTime is the total time it took for the run to complete. The TotalTime is the total of all the individual times of each operation, which may have been running in separate goroutines.
type Main ¶
type Main struct { Hosts []string ThreadCount int SpecFiles []string Verbose bool Prefix string NumQueries int64 NumRows int64 DataDir string ActualResults bool QueryTemplate string Indexes []string Seed int64 }
Main contains the flags dx uses.
type Query ¶
type Query struct { ID int64 `json:"id"` Type queryType `json:"query"` IndexName string `json:"index"` FieldName string `json:"field"` Rows []int64 `json:"rows"` Time TimeDuration `json:"time"` Result *pilosa.RowResult `json:"result,omitempty"` ResultCount *int64 `json:"resultcount,omitempty"` Error error `json:"-"` }
Query contains the information related to a single query.
type TimeDuration ¶
TimeDuration wraps time.Duration to encode to JSON.
func (*TimeDuration) MarshalJSON ¶
func (d *TimeDuration) MarshalJSON() (b []byte, err error)
MarshalJSON serializes TimeDuration to json.
func (*TimeDuration) UnmarshalJSON ¶
func (d *TimeDuration) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON deserializes json to TimeDuration.