MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / make_tile

Function make_tile

nodedb-array/src/codec/tile_encode.rs:154–168  ·  view source on GitHub ↗
(s: &crate::schema::ArraySchema, n: usize)

Source from the content-addressed store, hash-verified

152 }
153
154 fn make_tile(s: &crate::schema::ArraySchema, n: usize) -> SparseTile {
155 let mut b = SparseTileBuilder::new(s);
156 for i in 0..n {
157 b.push_row(SparseRow {
158 coord: &[CoordValue::Int64(i as i64), CoordValue::Int64(i as i64 * 2)],
159 attrs: &[CellValue::Int64(i as i64)],
160 surrogate: Surrogate::ZERO,
161 valid_from_ms: i as i64 * 10,
162 valid_until_ms: OPEN_UPPER,
163 kind: RowKind::Live,
164 })
165 .unwrap();
166 }
167 b.build()
168 }
169
170 #[test]
171 fn small_tile_uses_raw_tag() {

Callers 5

small_tile_uses_raw_tagFunction · 0.70
small_tile_roundtripFunction · 0.70
large_tile_roundtripFunction · 0.70
version_byte_is_oneFunction · 0.70

Calls 2

push_rowMethod · 0.80
buildMethod · 0.45

Tested by 5

small_tile_uses_raw_tagFunction · 0.56
small_tile_roundtripFunction · 0.56
large_tile_roundtripFunction · 0.56
version_byte_is_oneFunction · 0.56