projectsyn / reclass-rs

Reimplementation of https://github.com/kapicorp/reclass in Rust with Python bindings through PyO3.
BSD 3-Clause "New" or "Revised" License
8 stars 0 forks source link

Refactor `Reclass` constructor classmethods #104

Closed simu closed 8 months ago

simu commented 8 months ago

This is a breaking change for users that switched to the Reclass.from_config() constructor classmethod which was introduced in #92.

This PR renames the existing Reclass.from_config() classmethod to Reclass.from_config_file() and introduces a new classmethod Reclass.from_config() which initializes a Reclass instance from an already initialized Config instance.

Checklist

github-actions[bot] commented 8 months ago

Benchmark for 49ad923

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1638.9±125.56µs | 1619.5±53.49µs | -1.18% | | Reclass::inventory() single-threaded | 3.6±0.07ms | 3.6±0.04ms | 0.00% |
github-actions[bot] commented 8 months ago

Benchmark for 1b5d838

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1643.7±117.19µs | 1615.3±52.92µs | -1.73% | | Reclass::inventory() single-threaded | 3.7±0.04ms | **3.6±0.04ms** | **-2.70%** |
github-actions[bot] commented 8 months ago

Benchmark for aaecb64

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1606.1±49.61µs | 1645.8±115.65µs | +2.47% | | Reclass::inventory() single-threaded | 3.6±0.03ms | 3.6±0.05ms | 0.00% |
github-actions[bot] commented 8 months ago

Benchmark for d3da62b

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1631.9±119.53µs | 1638.9±118.65µs | +0.43% | | Reclass::inventory() single-threaded | 3.6±0.06ms | 3.6±0.04ms | 0.00% |