Skip to content

Commit

Permalink
create workfspace structre
Browse files Browse the repository at this point in the history
  • Loading branch information
lquenti committed Jan 21, 2024
1 parent 18974ac commit e56a81c
Show file tree
Hide file tree
Showing 10 changed files with 146 additions and 7 deletions.
14 changes: 8 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[package]
name = "blackheap"
version = "0.1.0"
edition = "2021"
[workspace]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
members = [
"blackheap",
"blackheap-benchmarker",
"blackheap-core",
"blackheap-analyzer"
]

[dependencies]
resolver = "2"
60 changes: 60 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Blackheap

This tool creates a performance model of your I/O speed and further allows to predict future preformance.

## Note

There is a **big recode** right now. But how does one eat an elephant...

## Progress
- [x] Start new repo
- [ ] Requirements Engineering
- [x] Find out how to formalize what the code should do
- fuck formalization, we use pseudocode
- [ ] Look what the code did before by looking through...
- [ ] <https://lquenti.github.io/blackheap/book/>
- [ ] <https://gwdg.github.io/iofs/book/>
- [ ] `blackheap-benchmark`
- [ ] `blackheap-modeller`
- [ ] `blackheap-frontend`
- [ ] `preloadee`
- [ ] All open issues
- [ ] All closed isses
- Unstructured ideas:
- Has to be resumeable
- be able to re-analyze raw data again
- Provide machine generated README in the data
- [ ] Design a high level architecture based on the requirements
- [ ] Start writing the benchmarker
- [ ] Figure out how C/Rust interop work with a simple test (do some computations in C, test in Rust)
- [ ]
- [ ] ...

- [ ] rewrite docs
- [ ] Check whether there was some information in the old docs that is lost

## Architecture
Cargo workspace with the following crates
```
- blackheap-core (lib): stuff all other libraries need (like Definitions)
- blackheap-benchmarker (lib): C code with Rust wrapper
- blackheap-analyzer (lib): Analysis of the benchmarks
- blackheap (bin): The user facing code
```

High level workflow:
```
- user starts blackheap with config parameters
- blackheap checks which benchmarks are already done
- If folder doesnt exist / was not provided, do all benchmarks
- based on those benchmarks, do the analysis
- Create (human-readable) plots
- Create (machine-readable) parsing data
```

Benchmarker:
```
- get input from Rust struct
- give output in Rust struct
- Rust part should support a to json function for persistence
```
8 changes: 8 additions & 0 deletions blackheap-analyzer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "blackheap-analyzer"
version = "0.1.0"
edition = "2021"

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

[dependencies]
14 changes: 14 additions & 0 deletions blackheap-analyzer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
8 changes: 8 additions & 0 deletions blackheap-benchmarker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "blackheap-benchmarker"
version = "0.1.0"
edition = "2021"

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

[dependencies]
14 changes: 14 additions & 0 deletions blackheap-benchmarker/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
8 changes: 8 additions & 0 deletions blackheap-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "blackheap-core"
version = "0.1.0"
edition = "2021"

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

[dependencies]
14 changes: 14 additions & 0 deletions blackheap-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
12 changes: 12 additions & 0 deletions blackheap/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "blackheap"
version = "0.1.0"
edition = "2021"
description = "An blackbox approach to I/O modelling."
homepage = "https://github.com/lquenti/blackheap"
repository = "https://github.com/lquenti/blackheap"
license = "MIT"
authors = ["Lars Quentin <[email protected]>"]
readme = "./README.md"

[dependencies]
1 change: 0 additions & 1 deletion src/main.rs → blackheap/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ mod tests {
assert_eq!(2 + 2, 4);
}
}

0 comments on commit e56a81c

Please sign in to comment.