Skip to content

Commit

Permalink
some improvement (intel#5765)
Browse files Browse the repository at this point in the history
  • Loading branch information
MeouSker77 authored and ForJadeForest committed Sep 20, 2022
1 parent e62ec8d commit 1140f6e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/nano/benchmark/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def run(self):
"""Run a workload."""
process = subprocess.run(f"bash {self.script_path}", stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True)
uuid = '' # uuid=='' means errors
uuid = '' # uuid=='' means running workload failed
try:
if process.returncode != 0:
err_msg = str(process.stderr, encoding='utf-8')
Expand Down Expand Up @@ -99,12 +99,12 @@ def _notify(self, uuid: str):
job_url = os.environ.get("JOB_URL")
token = os.environ.get("GITHUB_ACCESS_TOKEN")

text = f"@{user} Your benchmark <{comment_url}> has finished, \
see <{job_url}> for details\n\n"
text = f"@{user} Your benchmark <{comment_url}> of workload `{self.name}` \
has finished, see <{job_url}> for details\n\n"
if uuid == '':
text += "It seems there are some errors"
else:
text += f"Use `uuid={uuid}` to query the result"
text += f"Use `uuid='{uuid}'` to query the result"

requests.post(
url=pr_url,
Expand Down

0 comments on commit 1140f6e

Please sign in to comment.