()
| 552 | fn addr(byte: u8) -> Address { |
| 553 | Address::from_slice(&[byte; 32]).unwrap() |
| 554 | } |
| 555 | |
| 556 | fn ops(subst: u64) -> OpCounts { |
| 557 | OpCounts { subst_nodes: subst, ..OpCounts::default() } |
| 558 | } |
| 559 | |
| 560 | fn sample() -> BlockProfile { |
| 561 | let mut b = ProfileBuilder::new(); |
| 562 | // Three blocks a<b<c by address ordering. |
| 563 | b.block(addr(1), 100, 10, 1, ops(50)); |
| 564 | b.block(addr(2), 200, 20, 3, ops(100)); |
| 565 | b.block(addr(3), 300, 30, 1, ops(150)); |
| 566 | // a unfolds b and c; c unfolds b; self-edge ignored. |
nothing calls this directly
no test coverage detected