-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] First Draft of OPEA Triage Tool #1185
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tsai, Louie <[email protected]>
4f82faa
to
c90eb1b
Compare
a sample report zip file |
[ToDo] : understand whether we need debug RESTful API request here or using Telemetery |
"output": "Data preparation succeeded" | ||
}, | ||
{ | ||
"service": "retrival", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"service": "retrival", | |
"service": "retrieval", |
|
||
import requests | ||
unittest.TestLoader.sortTestMethodsUsing = None | ||
#unittest.TestLoader.sortTestMethodsUsing = lambda self, a, b: (a < b) - (a > b) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True) | ||
(output, err) = p.communicate() | ||
p_status = p.wait() | ||
#print("Command exit status/return code : ", p_status) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
print("json load failed: " + self.filename) | ||
pass | ||
for i in data[class_name]: | ||
#print(i["service"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
line= str(line)[2:-1] | ||
row = line.split() | ||
if columns != []: | ||
#print(row) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
|
||
import pandas as pd | ||
df = pd.DataFrame(rows,columns=columns ) | ||
#print(df) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
def update_docker_report(self, port, key, value): | ||
|
||
df = self.docker_report_df | ||
#docker_index = df.loc[df['PORTS'] == port] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
self.triage_level = triage_level | ||
self.triage_report = triage_report | ||
self.ip = "http://0.0.0.0" | ||
#print(command_line_param) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
import pandas as pd | ||
columns = ['env','value','required'] | ||
df = pd.DataFrame(rows,columns=columns ) | ||
#print(df) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
rows.append(['machine', system_info.machine]) | ||
rows.append(['processor', system_info.processor]) | ||
df = pd.DataFrame(rows,columns=columns ) | ||
#print(df) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
#print(df) | ||
self.triage_report.system_info_df = df | ||
|
||
#status, output = RunCmd().run("docker ps") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
|
||
# Health Check | ||
response_status_code = self.utils.service_health_check(self.ip, port, self.triage_report, self.triage_level) | ||
#self.assertEqual(response_status_code, 200) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
#self.assertEqual(response_status_code, 200) | ||
|
||
# Testing | ||
#response_status_code = utils.service_test(self.ip, port, endpoint_name, data, self.triage_report, self.triage_level) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
|
||
# Health Check | ||
response_status_code = self.utils.service_health_check(self.ip, port, self.triage_report, self.triage_level) | ||
#self.assertEqual(response_status_code, 200) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
|
||
# Health Check | ||
response_status_code = self.utils.service_health_check(self.ip, port, self.triage_report, self.triage_level) | ||
#self.assertEqual(response_status_code, 200) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
|
||
# Health Check | ||
response_status_code = self.utils.service_health_check(self.ip, port, self.triage_report, self.triage_level) | ||
#self.assertEqual(response_status_code, 200) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
|
||
# Health Check | ||
response_status_code = self.utils.service_health_check(self.ip, port, self.triage_report, self.triage_level) | ||
#self.assertEqual(response_status_code, 200) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
|
||
# Health Check | ||
response_status_code = self.utils.service_health_check(self.ip, port, self.triage_report, self.triage_level) | ||
#self.assertEqual(response_status_code, 200) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove any commented out code
Description
To help customers debug OPEA issues, we create a Triage Tool to test and gather needed information for debugging.
For the first draft, it is for ChatQnA.
How to Use:
python Triage.py ChatQnA_Xeon.json
only need to change json file for different architectures like Gaudi
The Triage Tools will run some simple tests including:
Below information will be gather after above testings
Report:
plan to have a HTML report.
Right now we have
console output
Below is the screenshot for console output.
html report with all docker logs embedded
Other info:
ToDo:
Issues
n/a
.Type of change
List the type of change like below. Please delete options that are not relevant.
Dependencies
NA
Tests
Manual Testing