Skip to content

Commit

Permalink
Update snapshots and replace the linera_base dependency by a linera_v…
Browse files Browse the repository at this point in the history
…iews one.
  • Loading branch information
MathieuDutSik committed Jul 12, 2024
1 parent e3d621e commit 2dbcd5d
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion linera-views-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ fn generate_view_code(input: ItemStruct, root: bool) -> TokenStream2 {
&context.base_key(),
);
#[cfg(not(target_arch = "wasm32"))]
use linera_base::prometheus_util::MeasureLatency as _;
use linera_views::prometheus_util::MeasureLatency as _;
let _latency = linera_views::LOAD_VIEW_LATENCY.measure_latency();
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ where
&context.base_key(),
);
#[cfg(not(target_arch = "wasm32"))]
use linera_base::prometheus_util::MeasureLatency as _;
use linera_views::prometheus_util::MeasureLatency as _;
let _latency = linera_views::LOAD_VIEW_LATENCY.measure_latency();
let keys = Self::pre_load(&context)?;
let values = context.read_multi_values_bytes(keys).await?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ where
&context.base_key(),
);
#[cfg(not(target_arch = "wasm32"))]
use linera_base::prometheus_util::MeasureLatency as _;
use linera_views::prometheus_util::MeasureLatency as _;
let _latency = linera_views::LOAD_VIEW_LATENCY.measure_latency();
let keys = Self::pre_load(&context)?;
let values = context.read_multi_values_bytes(keys).await?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl linera_views::views::View<CustomContext> for TestView {
&context.base_key(),
);
#[cfg(not(target_arch = "wasm32"))]
use linera_base::prometheus_util::MeasureLatency as _;
use linera_views::prometheus_util::MeasureLatency as _;
let _latency = linera_views::LOAD_VIEW_LATENCY.measure_latency();
let keys = Self::pre_load(&context)?;
let values = context.read_multi_values_bytes(keys).await?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ where
&context.base_key(),
);
#[cfg(not(target_arch = "wasm32"))]
use linera_base::prometheus_util::MeasureLatency as _;
use linera_views::prometheus_util::MeasureLatency as _;
let _latency = linera_views::LOAD_VIEW_LATENCY.measure_latency();
let keys = Self::pre_load(&context)?;
let values = context.read_multi_values_bytes(keys).await?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl linera_views::views::View<custom::GenericContext<T>> for TestView {
&context.base_key(),
);
#[cfg(not(target_arch = "wasm32"))]
use linera_base::prometheus_util::MeasureLatency as _;
use linera_views::prometheus_util::MeasureLatency as _;
let _latency = linera_views::LOAD_VIEW_LATENCY.measure_latency();
let keys = Self::pre_load(&context)?;
let values = context.read_multi_values_bytes(keys).await?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ where
&context.base_key(),
);
#[cfg(not(target_arch = "wasm32"))]
use linera_base::prometheus_util::MeasureLatency as _;
use linera_views::prometheus_util::MeasureLatency as _;
let _latency = linera_views::LOAD_VIEW_LATENCY.measure_latency();
let keys = Self::pre_load(&context)?;
let values = context.read_multi_values_bytes(keys).await?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl linera_views::views::View<custom::path::to::ContextType> for TestView {
&context.base_key(),
);
#[cfg(not(target_arch = "wasm32"))]
use linera_base::prometheus_util::MeasureLatency as _;
use linera_views::prometheus_util::MeasureLatency as _;
let _latency = linera_views::LOAD_VIEW_LATENCY.measure_latency();
let keys = Self::pre_load(&context)?;
let values = context.read_multi_values_bytes(keys).await?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ where
&context.base_key(),
);
#[cfg(not(target_arch = "wasm32"))]
use linera_base::prometheus_util::MeasureLatency as _;
use linera_views::prometheus_util::MeasureLatency as _;
let _latency = linera_views::LOAD_VIEW_LATENCY.measure_latency();
let keys = Self::pre_load(&context)?;
let values = context.read_multi_values_bytes(keys).await?;
Expand Down
7 changes: 3 additions & 4 deletions linera-views/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ The `LogView` can be seen as an analog of `VecDeque` while `MapView` is an analo
#![deny(clippy::large_futures)]

#[cfg(with_metrics)]
use {
linera_base::{prometheus_util, sync::Lazy},
prometheus::IntCounterVec,
};
pub use linera_base::prometheus_util;
#[cfg(with_metrics)]
use {linera_base::sync::Lazy, prometheus::IntCounterVec};

/// The definition of the batches for writing in the database.
pub mod batch;
Expand Down

0 comments on commit 2dbcd5d

Please sign in to comment.