about to try channels

master^2
bel 2020-05-02 14:13:56 -06:00
parent cd841f38eb
commit 74b2c36acf
4 changed files with 56 additions and 0 deletions

View File

@ -1,11 +1,38 @@
# This file is automatically @generated by Cargo. # This file is automatically @generated by Cargo.
# It is not intended for manual editing. # It is not intended for manual editing.
[[package]]
name = "autocfg"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
version = "0.1.10" version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "crossbeam-channel"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061"
dependencies = [
"crossbeam-utils",
"maybe-uninit",
]
[[package]]
name = "crossbeam-utils"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
dependencies = [
"autocfg",
"cfg-if",
"lazy_static",
]
[[package]] [[package]]
name = "getrandom" name = "getrandom"
version = "0.1.14" version = "0.1.14"
@ -17,12 +44,24 @@ dependencies = [
"wasi", "wasi",
] ]
[[package]]
name = "lazy_static"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.69" version = "0.2.69"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" checksum = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005"
[[package]]
name = "maybe-uninit"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
[[package]] [[package]]
name = "ppv-lite86" name = "ppv-lite86"
version = "0.2.6" version = "0.2.6"
@ -74,6 +113,7 @@ dependencies = [
name = "secert-hitler" name = "secert-hitler"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"crossbeam-channel",
"rand", "rand",
] ]

View File

@ -8,3 +8,4 @@ edition = "2018"
[dependencies] [dependencies]
rand = "*" rand = "*"
crossbeam-channel = "*"

View File

@ -3,6 +3,7 @@ use super::event::Event;
use rand::{self, Rng}; use rand::{self, Rng};
use rand::distributions::Alphanumeric; use rand::distributions::Alphanumeric;
use crossbeam_channel::{unbounded, Receiver, Sender};
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub struct MockRoom { pub struct MockRoom {
@ -60,6 +61,12 @@ impl Room for MockRoom {
} }
} }
impl Drop for MockRoom {
fn drop(&mut self) {
println!("not impl");
}
}
pub fn rands() -> String { pub fn rands() -> String {
rand::thread_rng() rand::thread_rng()
.sample_iter(&Alphanumeric) .sample_iter(&Alphanumeric)

View File

@ -549,3 +549,11 @@
2020-05-02 14:01:12,321 - synapse.storage.data_stores.main.event_push_actions - 506 - INFO - event_push_action_stream_orderings-39 - Searching for stream ordering 1 day ago 2020-05-02 14:01:12,321 - synapse.storage.data_stores.main.event_push_actions - 506 - INFO - event_push_action_stream_orderings-39 - Searching for stream ordering 1 day ago
2020-05-02 14:01:12,321 - synapse.storage.data_stores.main.event_push_actions - 511 - INFO - event_push_action_stream_orderings-39 - Found stream ordering 1 day ago: it's 2 2020-05-02 14:01:12,321 - synapse.storage.data_stores.main.event_push_actions - 511 - INFO - event_push_action_stream_orderings-39 - Found stream ordering 1 day ago: it's 2
2020-05-02 14:01:12,335 - synapse.storage.data_stores.main - 425 - INFO - generate_user_daily_visits-79 - Calling _generate_user_daily_visits 2020-05-02 14:01:12,335 - synapse.storage.data_stores.main - 425 - INFO - generate_user_daily_visits-79 - Calling _generate_user_daily_visits
2020-05-02 14:06:12,336 - synapse.storage.data_stores.main - 425 - INFO - generate_user_daily_visits-80 - Calling _generate_user_daily_visits
2020-05-02 14:06:52,323 - synapse.metrics - 464 - INFO - - Collecting gc 1
2020-05-02 14:11:12,325 - synapse.storage.data_stores.main.event_push_actions - 499 - INFO - event_push_action_stream_orderings-40 - Searching for stream ordering 1 month ago
2020-05-02 14:11:12,327 - synapse.storage.data_stores.main.event_push_actions - 504 - INFO - event_push_action_stream_orderings-40 - Found stream ordering 1 month ago: it's 2
2020-05-02 14:11:12,327 - synapse.storage.data_stores.main.event_push_actions - 506 - INFO - event_push_action_stream_orderings-40 - Searching for stream ordering 1 day ago
2020-05-02 14:11:12,328 - synapse.storage.data_stores.main.event_push_actions - 511 - INFO - event_push_action_stream_orderings-40 - Found stream ordering 1 day ago: it's 2
2020-05-02 14:11:12,336 - synapse.storage.data_stores.main - 425 - INFO - generate_user_daily_visits-81 - Calling _generate_user_daily_visits
2020-05-02 14:12:42,319 - synapse.metrics - 464 - INFO - - Collecting gc 1