computer: renames

This commit is contained in:
nym21
2026-01-10 10:23:29 +01:00
parent 69729842a4
commit 3bc0615000
229 changed files with 3203 additions and 3944 deletions
@@ -3,14 +3,14 @@ use brk_types::Version;
use super::Vecs;
use crate::{
distribution,
internal::{DollarsIdentity, LazyLastBlockValue, SatsIdentity},
internal::{DollarsIdentity, LazyValueBlockLast, SatsIdentity},
};
impl Vecs {
pub fn import(version: Version, distribution: &distribution::Vecs) -> Self {
let supply_metrics = &distribution.utxo_cohorts.all.metrics.supply;
Self(LazyLastBlockValue::from_block_source::<
Self(LazyValueBlockLast::from_block_source::<
SatsIdentity,
DollarsIdentity,
>(
@@ -1,8 +1,8 @@
use brk_traversable::Traversable;
use derive_more::{Deref, DerefMut};
use crate::internal::LazyLastBlockValue;
use crate::internal::LazyValueBlockLast;
/// Circulating supply - lazy references to distribution's actual supply (KISS)
#[derive(Clone, Deref, DerefMut, Traversable)]
pub struct Vecs(pub LazyLastBlockValue);
pub struct Vecs(pub LazyValueBlockLast);
@@ -3,11 +3,11 @@ use brk_types::Version;
use vecdb::Database;
use super::Vecs;
use crate::{indexes, internal::ComputedVecsDateAverage};
use crate::{indexes, internal::ComputedDateAverage};
impl Vecs {
pub fn forced_import(db: &Database, version: Version, indexes: &indexes::Vecs) -> Result<Self> {
Ok(Self(ComputedVecsDateAverage::forced_import(
Ok(Self(ComputedDateAverage::forced_import(
db,
"inflation_rate",
version,
@@ -2,9 +2,9 @@ use brk_traversable::Traversable;
use brk_types::StoredF32;
use derive_more::{Deref, DerefMut};
use crate::internal::ComputedVecsDateAverage;
use crate::internal::ComputedDateAverage;
/// Inflation rate metrics
#[derive(Clone, Deref, DerefMut, Traversable)]
#[traversable(transparent)]
pub struct Vecs(pub ComputedVecsDateAverage<StoredF32>);
pub struct Vecs(pub ComputedDateAverage<StoredF32>);
@@ -3,7 +3,7 @@ use brk_types::Version;
use vecdb::Database;
use super::Vecs;
use crate::{indexes, internal::ComputedVecsDateAverage};
use crate::{indexes, internal::ComputedDateAverage};
impl Vecs {
pub fn forced_import(
@@ -13,9 +13,9 @@ impl Vecs {
compute_dollars: bool,
) -> Result<Self> {
Ok(Self {
btc: ComputedVecsDateAverage::forced_import(db, "btc_velocity", version, indexes)?,
btc: ComputedDateAverage::forced_import(db, "btc_velocity", version, indexes)?,
usd: compute_dollars.then(|| {
ComputedVecsDateAverage::forced_import(db, "usd_velocity", version, indexes)
ComputedDateAverage::forced_import(db, "usd_velocity", version, indexes)
.unwrap()
}),
})
@@ -1,11 +1,11 @@
use brk_traversable::Traversable;
use brk_types::StoredF64;
use crate::internal::ComputedVecsDateAverage;
use crate::internal::ComputedDateAverage;
/// Velocity metrics (annualized volume / circulating supply)
#[derive(Clone, Traversable)]
pub struct Vecs {
pub btc: ComputedVecsDateAverage<StoredF64>,
pub usd: Option<ComputedVecsDateAverage<StoredF64>>,
pub btc: ComputedDateAverage<StoredF64>,
pub usd: Option<ComputedDateAverage<StoredF64>>,
}