8 Commits

Author SHA1 Message Date
Erik Johnston
d12aacd34b More renaming 2021-09-28 16:47:25 +01:00
Erik Johnston
47875bbf5d Fix module name 2021-09-28 16:42:29 +01:00
Erik Johnston
90afa17075 Fmt 2021-09-28 16:14:28 +01:00
Erik Johnston
7f71389689 Fix tests 2021-09-28 16:12:49 +01:00
Erik Johnston
404de3c745 Add instructions for publishing 2021-09-28 16:08:56 +01:00
Erik Johnston
08d312b66d Move synapse_auto_compressor 2021-09-28 16:05:38 +01:00
Erik Johnston
70b73489c0 Move auto_compressor to synapse_auto_compressor 2021-09-28 15:59:15 +01:00
Erik Johnston
4c4a93498f Add pypi metadata 2021-09-28 15:57:48 +01:00
4 changed files with 6 additions and 8 deletions

2
.github/CODEOWNERS vendored
View File

@@ -1,2 +0,0 @@
# Automatically request reviews from the synapse-core team when a pull request comes in.
* @matrix-org/synapse-core

2
Cargo.lock generated
View File

@@ -1104,7 +1104,7 @@ dependencies = [
[[package]]
name = "synapse_auto_compressor"
version = "0.1.2"
version = "0.1.1"
dependencies = [
"anyhow",
"clap",

View File

@@ -27,7 +27,7 @@ use clap::{crate_authors, crate_description, crate_name, crate_version, value_t,
use indicatif::{ProgressBar, ProgressStyle};
use rayon::prelude::*;
use state_map::StateMap;
use std::{collections::BTreeMap, convert::TryInto, fs::File, io::Write, str::FromStr};
use std::{collections::BTreeMap, fs::File, io::Write, str::FromStr};
use string_cache::DefaultAtom as Atom;
mod compressor;
@@ -162,7 +162,7 @@ impl Config {
Arg::with_name("groups_to_compress")
.short("n")
.value_name("GROUPS_TO_COMPRESS")
.help("How many groups to load into memory to compress")
.help("How many groups to load into memory to compress")
.long_help(concat!(
"How many groups to load into memory to compress (starting from",
" the 1st group in the room or the group specified by -s)"))
@@ -362,8 +362,8 @@ pub fn run(mut config: Config) {
}
if let Some(min) = config.min_saved_rows {
let saving = original_summed_size.saturating_sub(compressed_summed_size);
if saving < min.try_into().unwrap_or(0) {
let saving = (original_summed_size - compressed_summed_size) as i32;
if saving < min {
warn!(
"Only {} rows would be saved by this compression. Skipping output.",
saving

View File

@@ -1,7 +1,7 @@
[package]
name = "synapse_auto_compressor"
authors = ["William Ashton"]
version = "0.1.2"
version = "0.1.1"
edition = "2018"
[package.metadata.maturin]