-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add performance reports #107
Conversation
conftest.py
Outdated
with Client(small_cluster) as client: | ||
small_cluster.scale(10) | ||
client.wait_for_workers(10) | ||
client.restart() | ||
yield client | ||
with coiled.performance_report(f"{request.node.originalname}-{UNIQUE_ID}.html"): |
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.
With this, we are storing the performance reports on coiled, but I can't seem to find which is the bucket or storage that contains them. We should also maybe think about how to clean this up.
I see that in the coiled account we have some performance reports but not all of them, not sure exactly what's happening
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.
I can't seem to find which is the bucket or storage that contains them
I chatted with @shughes-uk offline and she mentioned today all performance reports are stored in a centralized S3 bucket that only Coiled staff have access to. I don't think this is a blocker for us, but it is good to know.
We should also maybe think about how to clean this up.
@shughes-uk mentioned this shouldn't become a problem unless we create millions of performance reports. I'm inclined to not worry about this for now -- I think it will take us a while before we've created millions of these : )
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.
I see that in the coiled account we have some performance reports but not all of them, not sure exactly what's happening
@koverholt pointed out that there's currently a limit of 5 hosted performance reports per user. Per the coiled.performance_report
API docs
Note each user is limited to 5 hosted reports with each a maximum file size of 10mb.
So if we want to keep performance reports around, then we should upload them to our own S3 bucket
…performance-reports
Depending on what you are looking for, the analytics page might get you this information for free |
That's a good point. With both #102 and #79 it would/would have been nice to see a performance report when we notice that something is taking longer than expected. I think this is definitely in the category of "nice to have" but not required. |
conftest.py
Outdated
with Client(small_cluster) as client: | ||
small_cluster.scale(10) | ||
client.wait_for_workers(10) | ||
client.restart() | ||
yield client | ||
local_file = str(tmp_path / "preformance-report.html") | ||
with performance_report(local_file): |
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.
If we use the coiled
version of performance reports, we should get hosting for free
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.
That's what I was initially wanting to do, but I believe there's a limit of 5 hosted reports today (xref #107 (comment))
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.
Oof, good point, I had forgotten about that
@jrbourbeau I added a life-cycle to the s3 prefix ( Would you be ok, would that? EDIT: Bump this period to 30 days |
I'm not seeing any new performance report being uploaded to s3, the latest date is 05/27. |
conftest.py
Outdated
local_file = str(tmp_path / "preformance-report.html") | ||
with performance_report(local_file): | ||
yield client | ||
s3.put(local_file, s3_report_url + f"/{request.node.originalname}.html") |
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.
Do we need to pass any credentials here? I can't find the proper docs, but my guess we are not seeing updates as we are not passing credentials
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.
Never mind, we are providing s3 which has the credentials
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 pass credentials when we create the s3
instance
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.
Then there has to be another problem because the files are not being uploaded
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.
Yeah, I see what I did wrong. I'll have to push up a commit with a fix, but probably not today
…performance-reports
Current status and problems (showed on this CI run):
In conclusion,
cc: @ian-r-rose what do you think we should do here? |
@ian-r-rose @ncclementi and I chatted about this offline and decided to put this on hold. This is a nice-to-have but also somewhat complicated. If this becomes nicer-to-have in the future we can revive this PR |
This uploads performance reports for tests