perf(research): add compact replay projections and representative profiling
This commit is contained in:
parent
19e9dad68b
commit
e3bd722e31
21 changed files with 2830 additions and 130 deletions
|
|
@ -67,7 +67,8 @@ pub struct LedgerCheckpoint {
|
|||
pub receipts: Vec<LedgerReceipt>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct OwnerValuation {
|
||||
pub owner_id: Id,
|
||||
pub initial_capital: Posting,
|
||||
|
|
@ -81,7 +82,8 @@ pub struct OwnerValuation {
|
|||
pub equity_contribution: Posting,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct LedgerValuation {
|
||||
pub cash: Posting,
|
||||
pub marked_holdings: Posting,
|
||||
|
|
@ -693,6 +695,12 @@ impl Ledger {
|
|||
})
|
||||
}
|
||||
|
||||
/// Read-only accepted financial history, including replay-labelled aliases.
|
||||
/// Reporting must skip aliases; this does not copy a restorable checkpoint.
|
||||
pub fn receipts(&self) -> &[LedgerReceipt] {
|
||||
&self.receipts
|
||||
}
|
||||
|
||||
pub fn checkpoint(&self) -> LedgerCheckpoint {
|
||||
LedgerCheckpoint {
|
||||
version: Version,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue