Skip to content

Commit

Permalink
Merge pull request #134 from instaclustr/issue-126
Browse files Browse the repository at this point in the history
issue-126, fft/brro compressor was renamed to atsc
  • Loading branch information
cjrolo authored Nov 14, 2024
2 parents 87dcb2c + 0b96d3e commit 2db85e0
Show file tree
Hide file tree
Showing 35 changed files with 66 additions and 68 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This project adheres to a code of conduct that is based on respect, collaboratio

### Reporting Issues

If you encounter a bug, performance issue, or have a suggestion for an enhancement, please open an issue in our [GitHub repository](https://github.com/instaclustr/fft-compression/issues). Make sure to provide as much detail as possible to help us understand the problem or suggestion. **But check for existing issues first!**
If you encounter a bug, performance issue, or have a suggestion for an enhancement, please open an issue in our [GitHub repository](https://github.com/instaclustr/atsc/issues). Make sure to provide as much detail as possible to help us understand the problem or suggestion. **But check for existing issues first!**

When reporting an issue, please include:
- A clear and descriptive title.
Expand All @@ -45,7 +45,7 @@ We accept contributions via Pull Requests (PRs). Before submitting a PR, please

#### How to Create a Pull Request (PR)

1. Go to the [GitHub repository](https://github.com/instaclustr/fft-compression).
1. Go to the [GitHub repository](https://github.com/instaclustr/atsc).
2. Click on the "Pull Requests" tab.
3. Press the **"New pull request"** button.
4. Select the **base repository** and the branch where you want to merge your changes (`main`).
Expand Down Expand Up @@ -100,6 +100,6 @@ Feel free to contribute to these ongoing efforts or propose your own enhancement

We value your feedback and suggestions! If you have any ideas on how to improve the BRRO Compressor, please don't hesitate to share them. You can do so by:

- Opening a new issue labeled as a `suggestion` in our [GitHub repository](https://github.com/instaclustr/fft-compression).
- Opening a new issue labeled as a `suggestion` in our [GitHub repository](https://github.com/instaclustr/atsc).

Your input helps us shape the future of the project, and we appreciate any suggestions or feedback you can provide.
46 changes: 23 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
members = [
"brro-compressor",
"atsc",
"tools",
"wavbrro",
"vsri",
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FFT-compression Maintainers
# ATSC Maintainers

## Maintainers

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

## Documentation

For full documentation please go to [Docs](https://github.com/instaclustr/fft-compression/tree/main/docs)
For full documentation please go to [Docs](https://github.com/instaclustr/atsc/tree/main/docs)

## Building ATSC

1. Clone the repository:

```bash
git clone https://github.com/instaclustr/fft-compression
cd fft-compression
git clone https://github.com/instaclustr/atsc
cd atsc
```

2. Build the project:
Expand Down Expand Up @@ -38,7 +38,7 @@ Internally ATSC uses the following methods for time series fitting:

For a more detailed insight into ATSC read the paper here: [ATSC - A novel approach to time-series compression](https://some.url.com)

Currently, ATSC uses an internal format to process time series (WBRO) and outputs a compressed format (BRO). A CSV to WBRO format is available here: [CSV Compressor](https://github.com/instaclustr/fft-compression/tree/main/csv-compressor)
Currently, ATSC uses an internal format to process time series (WBRO) and outputs a compressed format (BRO). A CSV to WBRO format is available here: [CSV Compressor](https://github.com/instaclustr/atsc/tree/main/csv-compressor)

## Where does ATSC fits?

Expand All @@ -61,8 +61,8 @@ Example of use cases:

### Usage

ATSC relies on files with a WBRO extension to operate, learn more about that here: [WBRO - A time series format](https://github.com/instaclustr/fft-compression/tree/main/wavbrro)
You can also compress from CSV with the provided [CSV tool](https://github.com/instaclustr/fft-compression/tree/main/csv-compressor)
ATSC relies on files with a WBRO extension to operate, learn more about that here: [WBRO - A time series format](https://github.com/instaclustr/atsc/tree/main/wavbrro)
You can also compress from CSV with the provided [CSV tool](https://github.com/instaclustr/atsc/tree/main/csv-compressor)
Those files would work as input for the compressor.

Compressor usage:
Expand Down
2 changes: 1 addition & 1 deletion brro-compressor/Cargo.toml → atsc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "brro-compressor"
name = "atsc"
version = "0.5.0"
authors = ["Carlos Rolo <[email protected]>"]
edition = "2021"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

use brro_compressor::compressor::fft::{fft, fft_allowed_error, fft_set, fft_to_data, FFT};
use atsc::compressor::fft::{fft, fft_allowed_error, fft_set, fft_to_data, FFT};
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use std::path::PathBuf;
use wavbrro::wavbrro::WavBrro;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ limitations under the License.
*/

// Import necessary libraries
use brro_compressor::compressor::polynomial::{
polynomial, polynomial_allowed_error, to_data, PolynomialType,
};
use atsc::compressor::polynomial::{polynomial, polynomial_allowed_error, to_data, PolynomialType};
use criterion::{black_box, criterion_group, criterion_main, Criterion};

// Define example sample data
Expand Down
16 changes: 8 additions & 8 deletions brro-compressor/demo/run_demo.sh → atsc/demo/run_demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,37 @@ do

cp $infilename tmp.wbro

../../target/debug/brro-compressor --compressor fft --error $i --verbose tmp.wbro > $mfile
../../target/debug/atsc --compressor fft --error $i --verbose tmp.wbro > $mfile
echo "FFT Size: "
du -sb tmp.bro
../../target/debug/brro-compressor -u --verbose tmp.bro >> $mfile
../../target/debug/atsc -u --verbose tmp.bro >> $mfile

sed -i -e 's/Output/output_fft/g' $mfile

cp $infilename tmp.wbro

../../target/debug/brro-compressor --compressor idw --error $i tmp.wbro > /dev/null
../../target/debug/atsc --compressor idw --error $i tmp.wbro > /dev/null
echo "IDW Size: "
du -sb tmp.bro
../../target/debug/brro-compressor -u --verbose tmp.bro >> $mfile
../../target/debug/atsc -u --verbose tmp.bro >> $mfile

sed -i -e 's/Output/output_idw/g' $mfile

cp $infilename tmp.wbro

../../target/debug/brro-compressor --compressor polynomial --error $i tmp.wbro > /dev/null
../../target/debug/atsc --compressor polynomial --error $i tmp.wbro > /dev/null
echo "Polynomial Size: "
du -sb tmp.bro
../../target/debug/brro-compressor -u --verbose tmp.bro >> $mfile
../../target/debug/atsc -u --verbose tmp.bro >> $mfile

sed -i -e 's/Output/output_poly/g' $mfile

cp $infilename tmp.wbro

../../target/debug/brro-compressor --error $i tmp.wbro > /dev/null
../../target/debug/atsc --error $i tmp.wbro > /dev/null
echo "Auto Size: "
du -sb tmp.bro
../../target/debug/brro-compressor -u --verbose tmp.bro >> $mfile
../../target/debug/atsc -u --verbose tmp.bro >> $mfile

sed -i -e 's/Output/output_auto/g' $mfile

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions brro-compressor/src/main.rs → atsc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

use brro_compressor::compressor::Compressor;
use brro_compressor::data::CompressedStream;
use brro_compressor::optimizer::OptimizerPlan;
use brro_compressor::utils::readers::bro_reader;
use atsc::compressor::Compressor;
use atsc::data::CompressedStream;
use atsc::optimizer::OptimizerPlan;
use atsc::utils::readers::bro_reader;
use clap::{arg, command, Parser};
use log::{debug, error};
use std::error::Error;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions brro-compressor/tests/e2e.rs → atsc/tests/e2e.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use brro_compressor::utils::error::calculate_error;
use atsc::utils::error::calculate_error;
use std::fs;
use std::path::{Path, PathBuf};
use wavbrro::wavbrro::WavBrro;
Expand Down Expand Up @@ -117,7 +117,7 @@ fn prepare_test_dir() -> PathBuf {

/// Runs compressor binary with provided arguments.
fn run_compressor(args: &[&str]) {
let compressor_bin = env!("CARGO_BIN_EXE_brro-compressor");
let compressor_bin = env!("CARGO_BIN_EXE_atsc");
let exit_status = std::process::Command::new(compressor_bin)
.args(args)
.status()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fn compress_file_with_speed(speed: u8) {

fn run_compressor(args: &[&str]) {
// path to binary set by cargo: https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates
let command = std::env!("CARGO_BIN_EXE_brro-compressor");
let command = std::env!("CARGO_BIN_EXE_atsc");

let status = std::process::Command::new(command)
.args(args)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions csv-compressor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
name = "csv-compressor"
version = "0.1.0"
edition = "2021"
description = "Utilizes brro-compressor functionalities to compress CSV formatted data"
description = "Utilizes ATSC functionalities to compress CSV formatted data"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
brro-compressor = { version = "0.5.0", path = "../brro-compressor" }
atsc = { version = "0.5.0", path = "../atsc" }
clap = { workspace = true, features = ["derive"] }
csv = "1.3.0"
serde = { version = "1.0.171", features = ["derive"] }
Expand Down
8 changes: 4 additions & 4 deletions csv-compressor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ limitations under the License.
*/

use crate::metric::Metric;
use brro_compressor::compressor::Compressor;
use brro_compressor::data::CompressedStream;
use brro_compressor::optimizer::OptimizerPlan;
use brro_compressor::utils::readers::bro_reader::read_file;
use atsc::compressor::Compressor;
use atsc::data::CompressedStream;
use atsc::optimizer::OptimizerPlan;
use atsc::utils::readers::bro_reader::read_file;
use clap::{arg, Parser};
use log::debug;
use std::fs;
Expand Down
12 changes: 6 additions & 6 deletions plot_comparison.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ error=$1

cp ../../wbro-july/$filename.wbro tmp.wbro

target/debug/brro-compressor --compressor fft --error $error --verbose tmp.wbro > ../../comparison-$filename.m
target/debug/brro-compressor -u --verbose tmp.bro >> ../../comparison-$filename.m
target/debug/atsc --compressor fft --error $error --verbose tmp.wbro > ../../comparison-$filename.m
target/debug/atsc -u --verbose tmp.bro >> ../../comparison-$filename.m

sed -i -e 's/Output/output_fft/g' ../../comparison-$filename.m

cp ../../wbro-july/$filename.wbro tmp.wbro

target/debug/brro-compressor --compressor idw --error $error --verbose tmp.wbro > /dev/null
target/debug/brro-compressor -u --verbose tmp.bro >> ../../comparison-$filename.m
target/debug/atsc --compressor idw --error $error --verbose tmp.wbro > /dev/null
target/debug/atsc -u --verbose tmp.bro >> ../../comparison-$filename.m

sed -i -e 's/Output/output_idw/g' ../../comparison-$filename.m

cp ../../wbro-july/$filename.wbro tmp.wbro

target/debug/brro-compressor --compressor polynomial --error $error --verbose tmp.wbro > /dev/null
target/debug/brro-compressor -u --verbose tmp.bro >> ../../comparison-$filename.m
target/debug/atsc --compressor polynomial --error $error --verbose tmp.wbro > /dev/null
target/debug/atsc -u --verbose tmp.bro >> ../../comparison-$filename.m

sed -i -e 's/Output/output_poly/g' ../../comparison-$filename.m

Expand Down
4 changes: 2 additions & 2 deletions plot_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
filename=$2
compressor=$1
cp ../../wbro-july/$filename.wbro tmp.wbro
target/debug/brro-compressor --compressor $compressor --error 1 --verbose tmp.wbro > ../../$filename-$compressor.m
target/debug/brro-compressor -u --verbose tmp.bro >> ../../$filename-$compressor.m
target/debug/atsc --compressor $compressor --error 1 --verbose tmp.wbro > ../../$filename-$compressor.m
target/debug/atsc -u --verbose tmp.bro >> ../../$filename-$compressor.m
echo "plot(Input,'b', Output,'r')" >> ../../$filename-$compressor.m
echo "print -dpng $filename.png" >> ../../$filename-$compressor.m
rm tmp.wbro
Expand Down

0 comments on commit 2db85e0

Please sign in to comment.