(&mut self, table_id: &Self::TableId, rows: Vec<T>)
| 146 | } |
| 147 | |
| 148 | fn insert_bulk<T: BenchTable>(&mut self, table_id: &Self::TableId, rows: Vec<T>) -> ResultBench<()> { |
| 149 | let rows = rows.into_iter().map(|row| row.into_product_value()).collect(); |
| 150 | let args = product![ArrayValue::Product(rows)]; |
| 151 | let SpacetimeModule { runtime, module, .. } = self; |
| 152 | let reducer_name = format!("insert_bulk_{}", table_id.snake_case); |
| 153 | |
| 154 | runtime.block_on(async move { |
| 155 | module.call_reducer_binary(&reducer_name, &args).await?; |
| 156 | Ok(()) |
| 157 | }) |
| 158 | } |
| 159 | |
| 160 | fn update_bulk<T: BenchTable>(&mut self, table_id: &Self::TableId, row_count: u32) -> ResultBench<()> { |
| 161 | let args = product![row_count]; |
nothing calls this directly
no test coverage detected