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

Add support for config option `compose-node-name` #84

Closed simu closed 8 months ago

simu commented 9 months ago

This PR adds support for the Reclass option compose-node-name.

Additionally, we implement support for compatibility flags (including helpers to set/unset/clear flags from Python), and introduce a first flag ComposeNodeNameLiteralDots. This flag configures reclass-rs to generate node metadata which matches Python reclass when compose-node-name is enabled.

The compatibility flag is required because Python reclass discards literal dots in node filepaths when compose-node-name is enabled, resulting in incorrect node metadata for nodes which have literal dots in their filename (e.g. node a.1 in the test/inventory-compose-node-name inventory).

By default, reclass-rs will preserve literal dots in the node metadata (path, and part) for node names when compose-node-name is enabled.

Checklist

github-actions[bot] commented 9 months ago

Benchmark for 99ec232

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1611.1±112.38µs | 1628.5±115.33µs | +1.08% | | Reclass::inventory() single-threaded | 3.6±0.22ms | 3.6±0.17ms | 0.00% |
github-actions[bot] commented 9 months ago

Benchmark for 6813fe4

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1601.8±107.07µs | 1633.1±108.14µs | +1.95% | | Reclass::inventory() single-threaded | 3.6±0.03ms | 3.6±0.05ms | 0.00% |
github-actions[bot] commented 9 months ago

Benchmark for 1a46f47

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1620.7±120.36µs | 1659.2±131.87µs | +2.38% | | Reclass::inventory() single-threaded | 3.6±0.04ms | 3.6±0.17ms | 0.00% |
github-actions[bot] commented 9 months ago

Benchmark for 88eab2b

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1613.2±117.93µs | 1634.8±61.77µs | +1.34% | | Reclass::inventory() single-threaded | 3.6±0.16ms | 3.6±0.04ms | 0.00% |
github-actions[bot] commented 9 months ago

Benchmark for 1a9165b

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | **1577.0±49.28µs** | 1632.5±120.46µs | **+3.52%** | | Reclass::inventory() single-threaded | **3.6±0.19ms** | 3.7±0.06ms | **+2.78%** |
github-actions[bot] commented 9 months ago

Benchmark for 1356245

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1608.9±112.11µs | 1622.8±55.69µs | +0.86% | | Reclass::inventory() single-threaded | **3.6±0.12ms** | 3.7±0.07ms | **+2.78%** |
github-actions[bot] commented 9 months ago

Benchmark for fa9f549

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1579.0±57.69µs | 1626.3±128.10µs | +3.00% | | Reclass::inventory() single-threaded | **3.5±0.03ms** | 3.7±0.03ms | **+5.71%** |
github-actions[bot] commented 9 months ago

Benchmark for 2c10543

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1607.1±114.41µs | 1615.1±52.46µs | +0.50% | | Reclass::inventory() single-threaded | **3.5±0.03ms** | 3.7±0.32ms | **+5.71%** |
github-actions[bot] commented 9 months ago

Benchmark for 2c1e08e

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1631.6±147.91µs | 1608.7±50.40µs | -1.40% | | Reclass::inventory() single-threaded | **3.5±0.04ms** | 3.6±0.04ms | **+2.86%** |
github-actions[bot] commented 9 months ago

Benchmark for 7b95e60

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1685.8±165.52µs | 1660.7±116.57µs | -1.49% | | Reclass::inventory() single-threaded | **3.7±0.12ms** | 3.8±0.07ms | **+2.70%** |
github-actions[bot] commented 9 months ago

Benchmark for aeaeaec

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | **1568.6±47.84µs** | 1620.8±114.69µs | **+3.33%** | | Reclass::inventory() single-threaded | **3.6±0.03ms** | 3.7±0.06ms | **+2.78%** |
github-actions[bot] commented 9 months ago

Benchmark for 088c603

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1608.1±116.38µs | 1610.7±61.63µs | +0.16% | | Reclass::inventory() single-threaded | 3.6±0.13ms | 3.7±0.12ms | +2.78% |
github-actions[bot] commented 9 months ago

Benchmark for 5ce85db

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1611.4±113.46µs | 1607.3±69.68µs | -0.25% | | Reclass::inventory() single-threaded | **3.6±0.24ms** | 3.7±0.04ms | **+2.78%** |
github-actions[bot] commented 9 months ago

Benchmark for 55c8ed1

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1601.8±118.50µs | 1615.2±66.49µs | +0.84% | | Reclass::inventory() single-threaded | 3.6±0.05ms | 3.6±0.21ms | 0.00% |
github-actions[bot] commented 9 months ago

Benchmark for 7d31c32

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1615.1±111.17µs | 1636.4±57.90µs | +1.32% | | Reclass::inventory() single-threaded | **3.6±0.22ms** | 3.7±0.04ms | **+2.78%** |
github-actions[bot] commented 8 months ago

Benchmark for ef2f3fb

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | Reclass::inventory() multi-threaded | 1600.1±115.54µs | 1640.3±138.77µs | +2.51% | | Reclass::inventory() single-threaded | 3.6±0.03ms | 3.6±0.06ms | 0.00% |