Closed eandersson closed 1 year ago
Testing with the provided benchmark, this makes a huge difference in performance:
Before fix:
❯ python3.8 benches/large_resource_set.py TagAssetBenchmark
Filter : resource["IamInstanceProfile"]["Arn"].matches("(.*)(?=Enterprise-Reserved-CloudCustodian.*)") && (resource["Tags"].filter(x, x["Key"] == "ASSET")[0]["Value"] != "CLOUDCUSTODIAN" && resource["Tags"].filter(x, x["Key"] == "ASSET")[0]["Value"] != "CLOUDCORESERVICES" && present(resource["Tags"].filter(x, x["Key"] == "ASSET")[0]["Value"]))
Resources : 1,000
Total Time: 19,423.9 ms
Range : 13.0 ms - 172.3 ms
Mean : 19.19 ms
Median: 15.52 ms
After Fix:
❯ python3.8 benches/large_resource_set.py TagAssetBenchmark
Filter : resource["IamInstanceProfile"]["Arn"].matches("(.*)(?=Enterprise-Reserved-CloudCustodian.*)") && (resource["Tags"].filter(x, x["Key"] == "ASSET")[0]["Value"] != "CLOUDCUSTODIAN" && resource["Tags"].filter(x, x["Key"] == "ASSET")[0]["Value"] != "CLOUDCORESERVICES" && present(resource["Tags"].filter(x, x["Key"] == "ASSET")[0]["Value"]))
Resources : 1,000
Total Time: 2,690.9 ms
Range : 2.0 ms - 8.9 ms
Mean : 2.60 ms
Median: 2.45 ms
Had to close and re-open PR to fix issues with SLA not being recognized.
looks like one test failure on test_trace_decorator to address.
looks like one test failure on test_trace_decorator to address.
Ops. Missed that one. Fixed.
Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:
Coverage data is based on head (
6622fe6
) compared to base (50f9e8b
). Patch coverage: 100.00% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
The current logging isn't lazy-loaded. This means that all statements are evaluated even with logging disabled. This can have pretty a measurable impact on performance.