Skip to content

Commit

Permalink
set default batch size (#337)
Browse files Browse the repository at this point in the history
* set default batch size

* add default max batch size to k8s values

---------

Co-authored-by: Ertugrul Aypek <[email protected]>
  • Loading branch information
philsippl and eaypek-tfh authored Sep 9, 2024
1 parent 7e16b42 commit b4a7f35
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 3 deletions.
3 changes: 3 additions & 0 deletions deploy/stage/mpc1-stage/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ env:

- name: SMPC__INIT_DB_SIZE
value: "10000"

- name: SMPC__MAX_BATCH_SIZE
value: "64"
3 changes: 3 additions & 0 deletions deploy/stage/mpc2-stage/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ env:

- name: SMPC__INIT_DB_SIZE
value: "10000"

- name: SMPC__MAX_BATCH_SIZE
value: "64"
3 changes: 3 additions & 0 deletions deploy/stage/mpc3-stage/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ env:

- name: SMPC__INIT_DB_SIZE
value: "10000"

- name: SMPC__MAX_BATCH_SIZE
value: "64"
5 changes: 4 additions & 1 deletion deploy/stage/smpc0-stage-eu-north-1/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,7 @@ env:
value: "true"

- name: SMPC__INIT_DB_SIZE
value: "10000"
value: "10000"

- name: SMPC__MAX_BATCH_SIZE
value: "64"
3 changes: 3 additions & 0 deletions deploy/stage/smpc1-stage-eu-north-1/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ env:

- name: SMPC__INIT_DB_SIZE
value: "10000"

- name: SMPC__MAX_BATCH_SIZE
value: "64"
5 changes: 4 additions & 1 deletion deploy/stage/smpc2-stage-eu-north-1/values-iris-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,7 @@ env:
value: "true"

- name: SMPC__INIT_DB_SIZE
value: "10000"
value: "10000"

- name: SMPC__MAX_BATCH_SIZE
value: "64"
6 changes: 5 additions & 1 deletion iris-mpc-common/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,18 @@ pub struct Config {
#[serde(default)]
pub init_db_size: usize,

#[serde(default)]
#[serde(default = "default_max_batch_size")]
pub max_batch_size: usize,
}

fn default_processing_timeout_secs() -> u64 {
60
}

fn default_max_batch_size() -> usize {
64
}

impl Config {
pub fn load_config(prefix: &str) -> eyre::Result<Config> {
let settings = config::Config::builder();
Expand Down

0 comments on commit b4a7f35

Please sign in to comment.