misc: Use python f-strings for string formatting
This patch has been generated by applying flynt to the gem5 repo (ext has been excluded) JIRA: https://gem5.atlassian.net/browse/GEM5-831 Change-Id: I0935db6223d5426b99515959bde78e374cbadb04 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68957 Maintainer: Bobby Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
This commit is contained in:
@@ -295,7 +295,7 @@ def plotStackedStates(delay, states_list, bottom_state, plot_name, ylabel_str):
|
||||
for prev_sum, new_s in zip(time_sum, l_states[state])
|
||||
]
|
||||
|
||||
ax[sub_idx].set_title("Bank util %s" % bank_util)
|
||||
ax[sub_idx].set_title(f"Bank util {bank_util}")
|
||||
ax[sub_idx].xaxis.set_ticks(ind + width / 2.0)
|
||||
ax[sub_idx].xaxis.set_ticklabels(seqBytesValues, rotation=45)
|
||||
ax[sub_idx].set_xlabel("Seq. bytes")
|
||||
|
||||
@@ -147,7 +147,7 @@ def main():
|
||||
# avg_pwr is in mW, peak_bw in MiByte/s, bus_util in percent
|
||||
z.append(avg_pwr[j] / (bus_util[j] / 100.0 * peak_bw[j] / 1000.0))
|
||||
else:
|
||||
print("Unexpected mode %s" % mode)
|
||||
print(f"Unexpected mode {mode}")
|
||||
exit(-1)
|
||||
|
||||
i += 1
|
||||
|
||||
@@ -76,7 +76,7 @@ parser.add_argument("--pdf", action="store_true", help="output Latex and pdf")
|
||||
def main():
|
||||
args = parser.parse_args()
|
||||
if not os.path.isfile(args.statsfile):
|
||||
exit("Error! File not found: %s" % args.statsfile)
|
||||
exit(f"Error! File not found: {args.statsfile}")
|
||||
if not os.path.isdir(args.outdir):
|
||||
os.mkdir(args.outdir)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user