Skip to content

Commit

Permalink
Fixed uniffi problems
Browse files Browse the repository at this point in the history
Signed-off-by: Benedikt Zinn <[email protected]>
  • Loading branch information
BenediktZinn committed Jan 20, 2025
1 parent 3bb755f commit e66e49f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions rust/backend/daemon/src/collector/aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use ractor::{cast, Actor, ActorProcessingErr, ActorRef};
use shared::ziofa::event::EventType;
use shared::ziofa::log_event::EventData;
use shared::ziofa::time_series_event::EventTypeEnum;
use shared::ziofa::time_series_event::TimeSeries as ZioTimeSeries;
use shared::ziofa::time_series_event::TimeSeriesType;
use shared::ziofa::{Event, TimeSeriesEvent as ZioTimeSeriesEvent};
use std::collections::HashMap;
use tokio::time;
Expand All @@ -18,8 +18,8 @@ pub struct Aggregator;
impl Aggregator {
fn convert_map_to_prototype(
time_series_map: HashMap<u32, TimeSeries>,
) -> HashMap<u32, ZioTimeSeries> {
let mut map = HashMap::<u32, ZioTimeSeries>::with_capacity(time_series_map.len());
) -> HashMap<u32, TimeSeriesType> {
let mut map = HashMap::<u32, TimeSeriesType>::with_capacity(time_series_map.len());
for (id, time_series) in time_series_map {
map.insert(id, time_series.into());
}
Expand Down
4 changes: 2 additions & 2 deletions rust/backend/daemon/src/collector/time_series.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ impl TimeSeries {
}
}

impl From<TimeSeries> for shared::ziofa::time_series_event::TimeSeries {
impl From<TimeSeries> for shared::ziofa::time_series_event::TimeSeriesType {
fn from(series: TimeSeries) -> Self {
shared::ziofa::time_series_event::TimeSeries {
shared::ziofa::time_series_event::TimeSeriesType{
list: series.as_array(),
}
}
Expand Down
1 change: 1 addition & 0 deletions rust/shared/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ static UNIFFI_RECORDS: LazyLock<Vec<&str>> = LazyLock::new(|| {
"SysSigquitConfig",
"GcConfig",
"GcEvent",
"TimeSeriesType"
]
} else {
vec![]
Expand Down
4 changes: 2 additions & 2 deletions rust/shared/proto/ziofa.proto
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ message TimeSeriesEvent {
EventTypeEnum event_type_enum = 1;
uint32 timeframe_ms = 2;

message time_series{
message TimeSeriesType{
repeated uint64 list = 1;
}

map<uint32, time_series>time_series_map = 3;
map<uint32, TimeSeriesType>time_series_map = 3;
}


Expand Down

0 comments on commit e66e49f

Please sign in to comment.