reportportal / agent-Python-RobotFramework

Robot Framework integration for Report Portal
Apache License 2.0
59 stars 33 forks source link

Performance with robotframework-reportportal 6-10 times slower than without #177

Closed seemme closed 11 months ago

seemme commented 1 year ago

Describe the bug We enabled robotframework-reportportal for the first time in our projects and recognized that the tests takes 6-10 times longer as without

Steps to Reproduce Steps to reproduce the behavior:

  1. Run tests without robotframework-reportportal

image

  1. Run tests with robotframework-reportportal image

Expected behavior Tests should not be massive slower with reportportal

Package versions robotframework-reportportal==5.4.0

Used Properties --listener robotframework_reportportal.listener\ --variable RP_API_KEY:${ATR_REPORTPORTAL_SECRET_KEY}\ --variable RP_ENDPOINT:${ATR_REPORTPORTAL_URL}\ --variable RP_LAUNCH:DCC\ --variable RP_LAUNCH_ATTRIBUTES:'Branch:${BAMBOO_BRANCH_NAME}'\ --variable RP_PROJECT:'ATR'\ --variable RP_ATTACH_XUNIT:'True'

vaibhavshukl12 commented 1 year ago

Hi @evjlobanova Hope you are doing well. I am also facing same issue . Any update or ETA for this fix.

HardNorth commented 11 months ago

@seemme @vaibhavshukl12 Please use agent version 5.5.0 which was released just now. It's already faster than previous versions, but for better performance you can play around RP_CLIENT_TYPE configuration variable. For me the best performance is for ASYNC_THREAD value.

HardNorth commented 11 months ago

@seemme @vaibhavshukl12, UPD after a lot of testing. It looks like the order in which the agent reports steps is really matter for our particular case (Robot Framework agent), unfortunately. That means if a parent reported as PASSED step, but its child reported as FAILED after the parent was finished the whole case will be marked as FAILED. For async clients this happens regularly, since parents don't really have to wait for all children. And especially often this happens for Robot Framework because it has plenty of constructions such as Expected to Fail, where a child should fail and it's in the process of reporting, but parent already reported as PASSED, so the last status overrides everything.

So my recommendation to use default values for RP_CLIENT_TYPE (default is SYNC). It's faster, than previous versions, but not light speed fast.

HardNorth commented 11 months ago

@seemme @vaibhavshukl12, UPD2 I do believe this is not a client/agent issue, agent reports everything accurate and Async client does exactly what it's supposed to do: do not wait for other requests/responses. So it looks like we need a server fix.

seemme commented 11 months ago

@HardNorth Thanks for your reply. I updated the client to 5.5.0 and checked your recommended settings. Unfortunately - as you already wrote - there is not a huge performance improvement.

So we will wait for the server fix and try it again. Is there already a open issue in the server repository?

dkomarek2 commented 7 months ago

If these two parameters are mutually exclusive, then RP is useless for me (we have the same problem in my company). The sync takes an awfully long time, or the test slows down so much that it is unusable. And if RP can't evaluate ELSE IF it is useless and we turn it off.

HardNorth commented 7 months ago

@dkomarek2 They are useless until we release a server fix. Unfortunately, it is stuck in production due to performance issues. Bet you would answer with the same words if we would release it now.