projectsyn / reclass-rs

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

Implement getters for `Reclass.nodes` and `Reclass.classes` #88

Closed simu closed 7 months ago

simu commented 7 months ago

This allows Python code to read basic information about the results of the node and classes discovery without having to render the inventory.

the new getters return dicts which map the normalized Reclass entity names (with dots for entities in subdirectories) to the file path associated with the entity.

Checklist

github-actions[bot] commented 7 months ago

Benchmark for f249446

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1610.0±50.69µs | 1638.8±140.97µs | +1.79% | | Reclass::inventory() single-threaded | **3.6±0.05ms** | 3.7±0.06ms | **+2.78%** |
github-actions[bot] commented 7 months ago

Benchmark for 979221c

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1634.5±117.51µs | 1646.3±114.34µs | +0.72% | | Reclass::inventory() single-threaded | 3.7±0.04ms | **3.6±0.06ms** | **-2.70%** |
github-actions[bot] commented 7 months ago

Benchmark for 44b2eaa

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1650.2±128.61µs | 1617.3±57.66µs | -1.99% | | Reclass::inventory() single-threaded | **3.6±0.04ms** | 3.7±0.05ms | **+2.78%** |
github-actions[bot] commented 7 months ago

Benchmark for 6e85d67

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1638.5±114.88µs | 1634.1±121.73µs | -0.27% | | Reclass::inventory() single-threaded | 3.7±0.12ms | **3.6±0.04ms** | **-2.70%** |
github-actions[bot] commented 7 months ago

Benchmark for 743ceb8

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1619.7±88.83µs | 1629.9±110.69µs | +0.63% | | Reclass::inventory() single-threaded | 3.6±0.03ms | 3.6±0.03ms | 0.00% |
github-actions[bot] commented 7 months ago

Benchmark for 12f8127

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1635.5±114.46µs | 1629.4±85.19µs | -0.37% | | Reclass::inventory() single-threaded | 3.6±0.09ms | 3.6±0.09ms | 0.00% |