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
Better plot.py with Python 3 & remove hard code #569
Conversation
crossbeam-channel/benchmarks/plot.py
Outdated
ax.barh([y+1 for y in ys], mpsc, color='black', **opts) | ||
ax.barh([y+2 for y in ys], futures_channel, color='blue', **opts) | ||
for (i, score) in enumerate(scores.values()): | ||
ax.barh([y + i - len(scores) // 2 for y in ys], score, **opts) |
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.
We're losing the different colors here, perhaps have a fixed colors
list that you index with i
?
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.
Matplotlib will allocate different colors automatically
Looks good, thanks! Could you please post an example plot created with the new version just to confirm it's comparable to the existing ones? |
It seems there are a few problems:
With those fixed, I think it'd be good to go. |
Sure, I have noticed them and I'll fix them in a few days.
Sincerely,
Jack Quinn
…---Original---
From: "Wojciech Nawrocki"<notifications@github.com>
Date: Wed, Sep 23, 2020 05:58 AM
To: "crossbeam-rs/crossbeam"<crossbeam@noreply.github.com>;
Cc: "QiuJiangkun"<qiujiangkun@foxmail.com>;"Author"<author@noreply.github.com>;
Subject: Re: [crossbeam-rs/crossbeam] Better plot.py with Python 3 & remove hard code (#569)
It seems there are a few problems:
non-existent benchmarks are default initialized to 0 and then shown as empty bars, but they shouldn't be displayed at all
the X-axis ticks are gone (just 0 on the left)
some of the horizontal bars are too long, and as you can see the text overlaps with other graphs
With those fixed, I think it'd be good to go.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
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.
LGTM. I made a small change to have cleaner names like mpsc
instead of Rust_mpsc
, and chan (Go)
instead of Go_chan
. I will merge in a week or so if noone objects.
bors r+ |
569: Better plot.py with Python 3 & remove hard code r=Vtec234 a=qiujiangkun I was trying to add my own crate into the benchmark and found out that this script was hard to read and modify. So I converted it into python 3 and removed most of the hardcode. Co-authored-by: QiuJiangkun <qiujiangkun@foxmail.com> Co-authored-by: Wojciech Nawrocki <wjnawrocki+gh@protonmail.com>
Build failed: |
502 on crates.io, merging manually. |
I was trying to add my own crate into the benchmark and found out that this script was hard to read and modify. So I converted it into python 3 and removed most of the hardcode.