Skip to content

Commit

Permalink
♻️ rafactor default params
Browse files Browse the repository at this point in the history
Signed-off-by: vankichi <kyukawa315@gmail.com>
  • Loading branch information
vankichi committed Feb 15, 2024
1 parent 9b0bfb8 commit 9880dfc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions docs/performance/continuos-benchmatk.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ And, Benchmark Operator also applies it to the Kubernetes cluster based on `Vald
| server_config | | server config for benchmark job pod<BR>Tune if can not getting the expected performance with default config. | object | ref: [defaults.server_config](https://github.com/vdaas/vald/blob/main/charts/vald/README.md) |

<a id="target-prop" />

**target**

- target Vald cluster information
Expand All @@ -77,6 +78,7 @@ And, Benchmark Operator also applies it to the Kubernetes cluster based on `Vald
| port | \* | target cluster's port | integer | 8081 |

<a id="dataset-prop" />

**dataset**

- dataset which is used for executing job operation
Expand All @@ -93,6 +95,7 @@ And, Benchmark Operator also applies it to the Kubernetes cluster based on `Vald
| url | | the dataset url. It should be set when set `name` as `original` | string | |

<a id="insert-cfg-props" />

**insert_config**

- rpc config for insert request
Expand All @@ -104,6 +107,7 @@ And, Benchmark Operator also applies it to the Kubernetes cluster based on `Vald
| timestamp | | The timestamp of the vector inserted.<br>If it is N/A, the current time will be used. | string | 1707272658 |

<a id="update-cfg-props" />

**update_config**

- rpc config for update request
Expand All @@ -116,6 +120,7 @@ And, Benchmark Operator also applies it to the Kubernetes cluster based on `Vald
| disable_balanced_update | | A flag to disable balanced update (split remove -&gt; insert operation) during update operation. | bool | false |

<a id="upsert-cfg-props" />

**upsert_config**

- rpc config for upsert request
Expand All @@ -128,6 +133,7 @@ And, Benchmark Operator also applies it to the Kubernetes cluster based on `Vald
| disable_balanced_update | | A flag to disable balanced update (split remove -&gt; insert operation) during update operation. | bool | false |

<a id="search-cfg-props" />

**upsert_config**

- rpc config for search request
Expand All @@ -144,6 +150,7 @@ And, Benchmark Operator also applies it to the Kubernetes cluster based on `Vald
| aggregation_algorithm | | The search aggregation algorithm option.<BR>default: `Unknown` | string enum: ["Unknown", "ConcurrentQueue", "SortSlice", "SortPoolSlice", "PairingHeap"] | |

<a id="remove-cfg-props" />

**remove_config**

- rpc config for remove request
Expand All @@ -155,6 +162,7 @@ And, Benchmark Operator also applies it to the Kubernetes cluster based on `Vald
| timestamp | | The timestamp of the vector inserted.<br>If it is N/A, the current time will be used. | string | 1707272658 |

<a id="object-cfg-props" />

**object_config**

- rpc config for get object request
Expand Down
8 changes: 7 additions & 1 deletion internal/k8s/vald/benchmark/job/job_template_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,18 @@ func WithImagePullPolicy(p ImagePullPolicy) BenchmarkJobTplOption {
type BenchmarkJobOption func(b *jobs.Job) error

// defaultTTLSeconds represents the default TTLSecondsAfterFinished for benchmark job template.
const defaultTTLSeconds int32 = 600
const (
defaultTTLSeconds int32 = 600
defaultCompletions int32 = 1
defaultParallelism int32 = 1
)

var defaultBenchmarkJobOpts = []BenchmarkJobOption{
WithSvcAccountName(svcAccount),
WithRestartPolicy(RestartPolicyNever),
WithTTLSecondsAfterFinished(defaultTTLSeconds),
WithCompletions(defaultCompletions),
WithParallelism(defaultParallelism),
}

// WithSvcAccountName sets the service account name for benchmark job.
Expand Down
2 changes: 1 addition & 1 deletion pkg/tools/benchmark/job/service/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type Option func(j *job) error

var defaultOpts = []Option{
// TODO: set default config for client
WithDimension(748),
WithDimension(784),
WithBeforeJobDuration("30s"),
WithRPS(1000),
WithConcurencyLimit(200),
Expand Down

0 comments on commit 9880dfc

Please sign in to comment.