Skip to content

Commit

Permalink
Merge pull request #60 from paigerube14/node_iterations
Browse files Browse the repository at this point in the history
Node densityn ignore iterations
  • Loading branch information
vishnuchalla authored Aug 15, 2024
2 parents 08cef10 + 2bc669e commit 224bc3e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ Orion now supports anomaly detection for your data. Use the ```--anomaly-detecti

You can now constrain your look-back period using the ```--lookback``` option. The format for look-back is ```XdYh```, where X represents the number of days and Y represents the number of hours.

You can open the match requirement by using the ```--node-count``` option to find any matching uuid based on the metadata and not have to have the same jobConfig.jobIterations. This variable is a ```True``` or ```False```, defaulted to False.

**_NOTE:_** The ```--hunter-analyze``` and ```--anomaly-detection``` flags are mutually exclusive. They cannot be used together because they represent different algorithms designed for distinct use cases.

### Daemon mode
Expand Down
1 change: 1 addition & 0 deletions orion.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def cli(max_content_width=120): # pylint: disable=unused-argument
@click.option("--lookback", help="Get data from last X days and Y hours. Format in XdYh")
@click.option("--convert-tinyurl", is_flag=True, help="Convert buildUrls to tiny url format for better formatting")
@click.option("--collapse", is_flag=True, help="Only outputs changepoints, previous and later runs in the xml format")
@click.option("--node-count", default=False, help="Match any node iterations count")
def cmd_analysis(**kwargs):
"""
Orion runs on command line mode, and helps in detecting regressions
Expand Down
5 changes: 3 additions & 2 deletions pkg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def filter_uuids_on_index(
uuids: List[str],
match: Matcher,
baseline: str,
filter_node_count: bool
) -> List[str]:
"""returns the index to be used and runs as uuids
Expand All @@ -170,7 +171,7 @@ def filter_uuids_on_index(
"""
if metadata["benchmark.keyword"] in ["ingress-perf", "k8s-netperf"]:
return uuids
if baseline == "":
if baseline == "" and not filter_node_count:
runs = match.match_kube_burner(uuids, fingerprint_index)
ids = match.filter_runs(runs, runs)
else:
Expand Down Expand Up @@ -235,7 +236,7 @@ def process_test(
benchmark_index = test["benchmarkIndex"]

uuids = filter_uuids_on_index(
metadata, benchmark_index, uuids, match, options["baseline"]
metadata, benchmark_index, uuids, match, options["baseline"], options['node_count']
)
# get metrics data and dataframe
metrics = test["metrics"]
Expand Down
5 changes: 5 additions & 0 deletions test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ setup() {
run_cmd orion cmd --config "examples/readout-control-plane-node-density.yaml" --hunter-analyze --output-format json --save-output-path=output.json
}

@test "orion cmd readout control plane node-density with json output and match all iterations " {
run_cmd orion cmd --config "examples/readout-control-plane-node-density.yaml" --hunter-analyze --output-format json --save-output-path=output.json --node-count True
}


@test "orion cmd readout netperf tcp with junit output " {
run_cmd orion cmd --config "examples/readout-netperf-tcp.yaml" --output-format junit --hunter-analyze --save-output-path=output.xml
}
Expand Down

0 comments on commit 224bc3e

Please sign in to comment.