Benchmark BM1362 frame encoding
main-release-gate / verify-and-release (push) Failing after 3m25s

This commit is contained in:
2026-10-15 22:06:06 -06:00
parent f1b4780e2c
commit 5aab1e0131
+37
View File
@@ -1,3 +1,7 @@
use alkane_os::bm1362::{
bt8d_for_baud, chain_inactive, encode_job, read_register, read_register_all, set_chip_address,
write_register, write_register_all, Job, S19J_PRO,
};
use alkane_os::bm1366::{decode_nonce_report, encode_work};
use alkane_os::difficulty::PoolDifficulty;
use alkane_os::miner::Bm1366Miner;
@@ -94,6 +98,39 @@ fn bench_bm1366_work_encoding() {
});
}
#[test]
#[ignore = "microbenchmark"]
fn bench_bm1362_commands() {
measure("bm1362_commands", 20_000, || {
black_box(chain_inactive());
black_box(set_chip_address(black_box(8)));
black_box(read_register(black_box(0x40), 0x1c));
black_box(read_register_all(0));
black_box(write_register(black_box(0x40), 0x18, 0x7a31));
black_box(write_register_all(0x80, 0));
black_box(bt8d_for_baud(black_box(115_200)));
black_box(S19J_PRO.chip_addresses().last());
});
}
#[test]
#[ignore = "microbenchmark"]
fn bench_bm1362_job_encoding() {
let job = Job {
work_id: 8,
num_midstates: 1,
start_nonce: 0,
nbits: 0x1a1f_2c34,
ntime: 0x5e9b_3cd4,
merkle_root: [0xa5; 32],
previous_hash: [0x5a; 32],
version: 0x2000_0000,
};
measure("bm1362_job_encoding", 20_000, || {
black_box(encode_job(black_box(&job)));
});
}
#[test]
#[ignore = "microbenchmark"]
fn bench_bm1366_report_decode() {