MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / insert_bulk_position

Function insert_bulk_position

modules/benchmarks/src/ia_loop.rs:144–151  ·  view source on GitHub ↗
(ctx: &ReducerContext, count: u32)

Source from the content-addressed store, hash-verified

142// ---------- insert bulk ----------
143#[spacetimedb::reducer]
144pub fn insert_bulk_position(ctx: &ReducerContext, count: u32) {
145 for id in 0..count {
146 ctx.db
147 .position()
148 .insert(Position::new(id, id as f32, (id + 5) as f32, (id * 5) as f32));
149 }
150 log::info!("INSERT POSITION: {count}");
151}
152
153#[spacetimedb::reducer]
154pub fn insert_bulk_velocity(ctx: &ReducerContext, count: u32) {

Callers 3

init_game_ia_loopMethod · 0.85
SPACETIMEDB_REDUCERFunction · 0.85
init_game_ia_loopFunction · 0.85

Calls 3

positionMethod · 0.80
insertMethod · 0.65
newFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…