mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 17:00:18 +00:00
Add --titles option
This commit is contained in:
1 parent
c649d8d569
commit
ca81ab2f91
1 file changed
+6
@@ -21,6 +21,9 @@ parser.add_argument(
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--log-time", help="Use a logarithmic time axis", action="store_true"
|
"--log-time", help="Use a logarithmic time axis", action="store_true"
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--titles", help="Comma-separated list of titles for the plot legend"
|
||||||
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@@ -45,4 +48,7 @@ else:
|
|||||||
if args.log_x:
|
if args.log_x:
|
||||||
plt.xscale("log")
|
plt.xscale("log")
|
||||||
|
|
||||||
|
if args.titles:
|
||||||
|
plt.legend(args.titles.split(","))
|
||||||
|
|
||||||
plt.show()
|
plt.show()
|
||||||
Reference in new issue
Block a user