Skip to content

Commit

Permalink
Starting afresh
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrobbel committed Mar 22, 2022
1 parent 474f797 commit aa7f5c2
Show file tree
Hide file tree
Showing 41 changed files with 1,351 additions and 4,951 deletions.
6 changes: 3 additions & 3 deletions .github/bors.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
status = [
"Check (stable)",
"Test (stable)",
"Check (nightly)",
"Test (nightly)",
"Rustfmt",
"Clippy (stable)",
"Clippy (nightly)",
"Miri",
"Rustdoc"
]
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1.0.3
with:
Expand All @@ -29,11 +29,11 @@ jobs:
needs: [rustdoc]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/download-artifact@v2
with:
name: rustdoc
path: public
- uses: peaceiris/actions-gh-pages@v3.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true
- uses: actions/download-artifact@v2
with:
name: rustdoc
path: public
- uses: peaceiris/actions-gh-pages@v3.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- '**'
- "**"

jobs:
github:
Expand All @@ -12,17 +12,17 @@ jobs:
permissions:
contents: write
steps:
- uses: softprops/action-gh-release@v0.1.7
- uses: softprops/action-gh-release@v0.1.7

crates:
name: Crates.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CRATES_IO_TOKEN }}
- uses: actions/checkout@v2.4.0
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CRATES_IO_TOKEN }}
24 changes: 10 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ jobs:
strategy:
matrix:
rust:
- stable
- 1.56.1
- nightly
steps:
- uses: actions/checkout@v2.4.0
- uses: actions-rs/toolchain@v1.0.7
Expand All @@ -28,8 +27,7 @@ jobs:
strategy:
matrix:
rust:
- stable
- 1.56.1
- nightly
steps:
- uses: actions/checkout@v2.4.0
- uses: actions-rs/toolchain@v1.0.7
Expand Down Expand Up @@ -63,8 +61,7 @@ jobs:
strategy:
matrix:
rust:
- stable
- 1.56.1
- nightly
steps:
- uses: actions/checkout@v2.4.0
- uses: actions-rs/toolchain@v1.0.7
Expand All @@ -83,17 +80,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- name: Miri nightly
id: miri_nightly
run: |
MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)
echo "::set-output name=rust::${MIRI_NIGHTLY}"
- uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: ${{ steps.miri_nightly.outputs.rust }}
toolchain: nightly
components: miri
default: true
override: true
- uses: actions-rs/cargo@v1.0.3
with:
command: miri
args: setup
- uses: actions-rs/cargo@v1.0.3
with:
command: miri
Expand Down Expand Up @@ -122,7 +118,7 @@ jobs:
with:
command: test
- name: Install grcov
run: curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-linux-x86_64.tar.bz2 | tar jxf -
run: curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf -
- name: grcov
run: ./grcov --branch --binary-path ./target/debug/ --source-dir . --output-type lcov --output-path lcov.info .
- uses: codecov/codecov-action@v2.1.0
15 changes: 9 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
[package]
name = "narrow"
version = "0.1.0"
version = "0.2.0"
authors = ["Matthijs Brobbel <m1brobbel@gmail.com>"]
edition = "2021"
rust-version = "1.56.1"
# rust-version = "nightly"
description = "An implementation of Apache Arrow"
readme = "README.md"
repository = "https://github.com/teratide/narrow"
repository = "https://github.com/mbrobbel/narrow"
documentation = "http://docs.rs/narrow/"
license = "Apache-2.0 OR MIT"
keywords = ["Arrow"]
categories = ["data-structures"]

[features]
default = []
default = ["nightly"]
nightly = ["extend_one", "simd"]
extend_one = []
simd = []

[dependencies]
narrow-derive = { version = "0.1.0", path = "narrow-derive" }
paste = "1"
# narrow-derive = { version = "0.2.0", path = "narrow-derive" }

[dev-dependencies]
criterion = "0.3"
rand = "0.8"

[profile.release]
lto = true
Expand Down
3 changes: 0 additions & 3 deletions benches/narrow/array/mod.rs

This file was deleted.

46 changes: 46 additions & 0 deletions benches/narrow/bitmap/iter.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
use criterion::{BenchmarkId, Criterion, Throughput};
use narrow::bitmap::Bitmap;
use rand::{prelude::StdRng, Rng, SeedableRng};

pub(super) fn bench(c: &mut Criterion) {
{
let mut group = c.benchmark_group("Bitmap::from_iter");
let mut rng = StdRng::seed_from_u64(1234);

for size in [12345] {
for null_fraction in [0., 0.1, 0.5, 0.9, 1.] {
let input = (0..size)
.into_iter()
.map(|_| rng.gen_bool(1. - null_fraction))
.collect::<Vec<_>>();
group.throughput(Throughput::Elements(size as u64));
group.bench_with_input(
BenchmarkId::new("narrow", format!("{}/{}", size, null_fraction)),
&input,
|b, input| b.iter(|| Bitmap::<Vec<u8>>::from_iter(input)),
);
}
}
}

{
let mut group = c.benchmark_group("Bitmap::into_iter");
let mut rng = StdRng::seed_from_u64(1234);

for size in [12345] {
for null_fraction in [0., 0.1, 0.5, 0.9, 1.] {
let input = (0..size)
.into_iter()
.map(|_| rng.gen_bool(1. - null_fraction))
.collect::<Vec<_>>();
let narrow_bitmap = Bitmap::<Vec<u8>>::from_iter(&input);
group.throughput(Throughput::Elements(size as u64));
group.bench_with_input(
BenchmarkId::new("narrow", format!("{}/{}", size, null_fraction)),
&narrow_bitmap,
|b, input| b.iter(|| Vec::<bool>::from_iter(input)),
);
}
}
}
}
7 changes: 7 additions & 0 deletions benches/narrow/bitmap/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use criterion::Criterion;

mod iter;

pub(super) fn bench(c: &mut Criterion) {
iter::bench(c);
}
4 changes: 2 additions & 2 deletions benches/narrow/main.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use criterion::{criterion_group, criterion_main, Criterion};

mod array;
mod bitmap;

criterion_group! {
name = narrow;
config = Criterion::default();
targets =
array::bench
bitmap::bench
}
criterion_main!(narrow);
4 changes: 2 additions & 2 deletions narrow-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "narrow-derive"
version = "0.1.0"
version = "0.2.0"
authors = ["Matthijs Brobbel <m1brobbel@gmail.com>"]
edition = "2021"
rust-version = "1.56.1"
description = "Derive macros for Narrow: A Rust implementation of Apache Arrow"
description = "Derive macros for Narrow: An implementation of Apache Arrow"
readme = "../README.md"
repository = "https://github.com/mbrobbel/narrow"
documentation = "http://docs.rs/narrow-derive/"
Expand Down
Loading

0 comments on commit aa7f5c2

Please sign in to comment.