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

Function cross_join_all

modules/benchmarks/src/circles.rs:119–130  ·  view source on GitHub ↗
(ctx: &ReducerContext, expected: u32)

Source from the content-addressed store, hash-verified

117// ```
118#[spacetimedb::reducer]
119pub fn cross_join_all(ctx: &ReducerContext, expected: u32) {
120 let mut count = 0;
121 for _circle in ctx.db.circle().iter() {
122 for _entity in ctx.db.entity().iter() {
123 for _food in ctx.db.food().iter() {
124 count += 1;
125 }
126 }
127 }
128
129 log::info!("CROSS JOIN ALL: {expected}, processed: {count}");
130}
131
132// Simulate
133// ```

Callers 3

run_game_circlesMethod · 0.85
SPACETIMEDB_REDUCERFunction · 0.85
run_game_circlesFunction · 0.85

Calls 1

iterMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…