Rename SfDbChannel
This commit is contained in:
@@ -13,9 +13,9 @@ use netpod::query::CacheUsage;
|
||||
use netpod::range::evrange::NanoRange;
|
||||
use netpod::AppendToUrl;
|
||||
use netpod::ByteSize;
|
||||
use netpod::Channel;
|
||||
use netpod::HostPort;
|
||||
use netpod::PerfOpts;
|
||||
use netpod::SfDbChannel;
|
||||
use netpod::APP_OCTET;
|
||||
use query::api4::binned::BinnedQuery;
|
||||
use streams::frames::inmem::InMemoryFrameAsyncReadStream;
|
||||
@@ -61,7 +61,7 @@ pub async fn get_binned(
|
||||
info!("end {}", end_date);
|
||||
info!("-------");
|
||||
let t1 = Utc::now();
|
||||
let channel = Channel {
|
||||
let channel = SfDbChannel {
|
||||
backend: channel_backend.clone(),
|
||||
name: channel_name.into(),
|
||||
series: None,
|
||||
|
||||
@@ -6,9 +6,9 @@ use http::StatusCode;
|
||||
use hyper::Body;
|
||||
use netpod::log::*;
|
||||
use netpod::range::evrange::NanoRange;
|
||||
use netpod::Channel;
|
||||
use netpod::Cluster;
|
||||
use netpod::HostPort;
|
||||
use netpod::SfDbChannel;
|
||||
use netpod::APP_JSON;
|
||||
use url::Url;
|
||||
|
||||
@@ -16,7 +16,7 @@ const TEST_BACKEND: &str = "testbackend-00";
|
||||
|
||||
// Fetches all data, not streaming, meant for basic test cases that fit in memory.
|
||||
async fn fetch_data_api_python_blob(
|
||||
channels: Vec<Channel>,
|
||||
channels: Vec<SfDbChannel>,
|
||||
beg_date: &str,
|
||||
end_date: &str,
|
||||
cluster: &Cluster,
|
||||
@@ -67,7 +67,7 @@ fn api3_hdf_dim0_00() -> Result<(), Error> {
|
||||
let rh = require_test_hosts_running()?;
|
||||
let cluster = &rh.cluster;
|
||||
let jsv = fetch_data_api_python_blob(
|
||||
vec![Channel {
|
||||
vec![SfDbChannel {
|
||||
backend: TEST_BACKEND.into(),
|
||||
name: "test-gen-i32-dim0-v00".into(),
|
||||
series: None,
|
||||
|
||||
@@ -13,9 +13,9 @@ use items_2::binsdim0::BinsDim0CollectedResult;
|
||||
use netpod::log::*;
|
||||
use netpod::range::evrange::NanoRange;
|
||||
use netpod::AppendToUrl;
|
||||
use netpod::Channel;
|
||||
use netpod::Cluster;
|
||||
use netpod::HostPort;
|
||||
use netpod::SfDbChannel;
|
||||
use netpod::APP_JSON;
|
||||
use query::api4::binned::BinnedQuery;
|
||||
use serde_json::Value as JsonValue;
|
||||
@@ -29,7 +29,7 @@ fn make_query<S: Into<String>>(
|
||||
end_date: &str,
|
||||
bin_count_min: u32,
|
||||
) -> Result<BinnedQuery, Error> {
|
||||
let channel = Channel {
|
||||
let channel = SfDbChannel {
|
||||
backend: TEST_BACKEND.into(),
|
||||
name: name.into(),
|
||||
series: None,
|
||||
@@ -47,7 +47,7 @@ fn binned_d0_json_00() -> Result<(), Error> {
|
||||
let rh = require_test_hosts_running()?;
|
||||
let cluster = &rh.cluster;
|
||||
let jsv = get_binned_json(
|
||||
Channel {
|
||||
SfDbChannel {
|
||||
backend: TEST_BACKEND.into(),
|
||||
name: "test-gen-i32-dim0-v01".into(),
|
||||
series: None,
|
||||
@@ -104,7 +104,7 @@ fn binned_d0_json_01a() -> Result<(), Error> {
|
||||
let rh = require_test_hosts_running()?;
|
||||
let cluster = &rh.cluster;
|
||||
let jsv = get_binned_json(
|
||||
Channel {
|
||||
SfDbChannel {
|
||||
backend: TEST_BACKEND.into(),
|
||||
name: "test-gen-i32-dim0-v01".into(),
|
||||
series: None,
|
||||
@@ -162,7 +162,7 @@ fn binned_d0_json_01b() -> Result<(), Error> {
|
||||
let rh = require_test_hosts_running()?;
|
||||
let cluster = &rh.cluster;
|
||||
let jsv = get_binned_json(
|
||||
Channel {
|
||||
SfDbChannel {
|
||||
backend: TEST_BACKEND.into(),
|
||||
name: "test-gen-i32-dim0-v01".into(),
|
||||
series: None,
|
||||
@@ -220,7 +220,7 @@ fn binned_d0_json_02() -> Result<(), Error> {
|
||||
let rh = require_test_hosts_running()?;
|
||||
let cluster = &rh.cluster;
|
||||
let jsv = get_binned_json(
|
||||
Channel {
|
||||
SfDbChannel {
|
||||
backend: TEST_BACKEND.into(),
|
||||
name: "test-gen-f64-dim1-v00".into(),
|
||||
series: None,
|
||||
@@ -279,7 +279,7 @@ fn binned_d0_json_03() -> Result<(), Error> {
|
||||
let rh = require_test_hosts_running()?;
|
||||
let cluster = &rh.cluster;
|
||||
let jsv = get_binned_json(
|
||||
Channel {
|
||||
SfDbChannel {
|
||||
backend: TEST_BACKEND.into(),
|
||||
name: "test-gen-f64-dim1-v00".into(),
|
||||
series: None,
|
||||
@@ -312,7 +312,7 @@ fn binned_d0_json_04() -> Result<(), Error> {
|
||||
let rh = require_test_hosts_running()?;
|
||||
let cluster = &rh.cluster;
|
||||
let jsv = get_binned_json(
|
||||
Channel {
|
||||
SfDbChannel {
|
||||
backend: TEST_BACKEND.into(),
|
||||
name: "test-gen-i32-dim0-v01".into(),
|
||||
series: None,
|
||||
@@ -365,7 +365,7 @@ fn binned_d0_json_04() -> Result<(), Error> {
|
||||
}
|
||||
|
||||
async fn get_binned_json(
|
||||
channel: Channel,
|
||||
channel: SfDbChannel,
|
||||
beg_date: &str,
|
||||
end_date: &str,
|
||||
bin_count: u32,
|
||||
|
||||
@@ -10,9 +10,9 @@ use items_2::eventsdim0::EventsDim0CollectorOutput;
|
||||
use netpod::log::*;
|
||||
use netpod::range::evrange::NanoRange;
|
||||
use netpod::AppendToUrl;
|
||||
use netpod::Channel;
|
||||
use netpod::Cluster;
|
||||
use netpod::HostPort;
|
||||
use netpod::SfDbChannel;
|
||||
use netpod::APP_JSON;
|
||||
use query::api4::events::PlainEventsQuery;
|
||||
use serde_json::Value as JsonValue;
|
||||
@@ -21,7 +21,7 @@ use url::Url;
|
||||
const TEST_BACKEND: &str = "testbackend-00";
|
||||
|
||||
fn make_query<S: Into<String>>(name: S, beg_date: &str, end_date: &str) -> Result<PlainEventsQuery, Error> {
|
||||
let channel = Channel {
|
||||
let channel = SfDbChannel {
|
||||
backend: TEST_BACKEND.into(),
|
||||
name: name.into(),
|
||||
series: None,
|
||||
@@ -59,7 +59,7 @@ fn events_plain_json_02_range_incomplete() -> Result<(), Error> {
|
||||
let rh = require_test_hosts_running()?;
|
||||
let cluster = &rh.cluster;
|
||||
let jsv = events_plain_json(
|
||||
Channel {
|
||||
SfDbChannel {
|
||||
backend: TEST_BACKEND.into(),
|
||||
name: "test-gen-i32-dim0-v01".into(),
|
||||
series: None,
|
||||
@@ -79,7 +79,7 @@ fn events_plain_json_02_range_incomplete() -> Result<(), Error> {
|
||||
|
||||
// TODO improve by a more information-rich return type.
|
||||
async fn events_plain_json(
|
||||
channel: Channel,
|
||||
channel: SfDbChannel,
|
||||
beg_date: &str,
|
||||
end_date: &str,
|
||||
cluster: &Cluster,
|
||||
|
||||
@@ -6,13 +6,13 @@ use items_0::WithLen;
|
||||
use items_2::eventsdim0::EventsDim0CollectorOutput;
|
||||
use netpod::log::*;
|
||||
use netpod::range::evrange::NanoRange;
|
||||
use netpod::Channel;
|
||||
use netpod::SfDbChannel;
|
||||
use query::api4::events::PlainEventsQuery;
|
||||
|
||||
const BACKEND: &str = "testbackend-00";
|
||||
|
||||
pub fn make_query<S: Into<String>>(name: S, beg_date: &str, end_date: &str) -> Result<PlainEventsQuery, Error> {
|
||||
let channel = Channel {
|
||||
let channel = SfDbChannel {
|
||||
backend: BACKEND.into(),
|
||||
name: name.into(),
|
||||
series: None,
|
||||
|
||||
@@ -8,8 +8,8 @@ use netpod::log::*;
|
||||
use netpod::query::CacheUsage;
|
||||
use netpod::range::evrange::NanoRange;
|
||||
use netpod::AppendToUrl;
|
||||
use netpod::Channel;
|
||||
use netpod::Cluster;
|
||||
use netpod::SfDbChannel;
|
||||
use netpod::APP_JSON;
|
||||
use query::api4::binned::BinnedQuery;
|
||||
use std::time::Duration;
|
||||
@@ -39,7 +39,7 @@ async fn get_json_common(
|
||||
let beg_date: DateTime<Utc> = beg_date.parse()?;
|
||||
let end_date: DateTime<Utc> = end_date.parse()?;
|
||||
let channel_backend = TEST_BACKEND;
|
||||
let channel = Channel {
|
||||
let channel = SfDbChannel {
|
||||
backend: channel_backend.into(),
|
||||
name: channel_name.into(),
|
||||
series: None,
|
||||
|
||||
Reference in New Issue
Block a user