repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | use std::mem::{size_of, offset_of}; |
| #2 | fn main() { |
| #3 | use percolator::RiskEngine; |
| #4 | println!("sizeof RiskEngine = {}", size_of::<RiskEngine>()); |
| #5 | println!("c_tot: {}", offset_of!(RiskEngine, c_tot)); |
| #6 | println!("pnl_pos_tot: {}", offset_of!(RiskEngine, pnl_pos_tot)); |
| #7 | println!("pnl_matured_pos_tot: {}", offset_of!(RiskEngine, pnl_matured_pos_tot)); |
| #8 | println!("adl_mult_long: {}", offset_of!(RiskEngine, adl_mult_long)); |
| #9 | println!("adl_mult_short: {}", offset_of!(RiskEngine, adl_mult_short)); |
| #10 | println!("adl_epoch_long: {}", offset_of!(RiskEngine, adl_epoch_long)); |
| #11 | println!("adl_epoch_short: {}", offset_of!(RiskEngine, adl_epoch_short)); |
| #12 | println!("side_mode_long: {}", offset_of!(RiskEngine, side_mode_long)); |
| #13 | println!("insurance_floor: {}", offset_of!(RiskEngine, insurance_floor)); |
| #14 | println!("num_used_accounts: {}", offset_of!(RiskEngine, num_used_accounts)); |
| #15 | println!("accounts: {}", offset_of!(RiskEngine, accounts)); |
| #16 | use percolator::Account; |
| #17 | println!("sizeof Account = {}", size_of::<Account>()); |
| #18 | println!("capital: {}", offset_of!(Account, capital)); |
| #19 | println!("pnl: {}", offset_of!(Account, pnl)); |
| #20 | println!("position_basis_q: {}", offset_of!(Account, position_basis_q)); |
| #21 | println!("adl_a_basis: {}", offset_of!(Account, adl_a_basis)); |
| #22 | println!("adl_epoch_snap: {}", offset_of!(Account, adl_epoch_snap)); |
| #23 | } |
| #24 |