Skip to content

Commit

Permalink
add requested changes
Browse files Browse the repository at this point in the history
Signed-off-by: Divya Madala <divyaasm@amazon.com>
  • Loading branch information
Divyaasm committed May 8, 2024
1 parent dc42bef commit b64621a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions jenkins/opensearch/benchmark-test-endpoint.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ parameters {
captureSegmentReplicationStat: CAPTURE_SEGMENT_REPLICATION_STAT,
telemetryParams: TELEMETRY_PARAMS
)
stash includes: 'test_execution.*', name: "benchmark"
stash includes: 'test_execution*.csv', name: "benchmark"

}
}
post {
always {
unstash "benchmark"
archiveArtifacts artifacts: 'test_execution.*'
archiveArtifacts artifacts: 'test_execution*.csv'
postCleanup()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ def run_tests(self) -> None:
with BenchmarkCreateCluster.create(self.args, self.test_manifest, config, current_workspace) as test_cluster:
benchmark_test_suite = BenchmarkTestSuite(test_cluster.endpoint_with_port, self.security, self.args, test_cluster.fetch_password())
try:
benchmark_test_suite.execute()
retry_call(benchmark_test_suite.execute, tries=3, delay=60, backoff=2)
finally:
subprocess.check_call(f"docker rm docker-container-{self.args.stack_suffix}", cwd=os.getcwd(), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
4 changes: 2 additions & 2 deletions src/test_workflow/benchmark_test/benchmark_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def convert(self, results: str) -> None:
with open(results) as file:
data = json.load(file)
formatted_data = pd.json_normalize(data["results"]["op_metrics"])
formatted_data.to_csv(os.path.join(os.getcwd(), "test_execution.csv"), index=False)
df = pd.read_csv(os.path.join(os.getcwd(), "test_execution.csv"))
formatted_data.to_csv(os.path.join(os.getcwd(), f"test_execution_{self.args.stack_suffix}.csv"), index=False)
df = pd.read_csv(os.path.join(os.getcwd(), f"test_execution_{self.args.stack_suffix}.csv"))
pd.set_option('display.width', int(2 * shutil.get_terminal_size().columns))
pd.set_option('display.max_rows', None)
pd.set_option('display.max_columns', None)
Expand Down

0 comments on commit b64621a

Please sign in to comment.