From 302935d4fc9daf0f3f6b658780fbea7f6c5e22f8 Mon Sep 17 00:00:00 2001 From: "Tom Bui [SSW]" <67776356+tombui99@users.noreply.github.com> Date: Thu, 15 Feb 2024 12:01:29 +1100 Subject: [PATCH 1/2] CodeAuditor - Fix broken link --- .../do-you-avoid-reviewing-performance-without-metrics/rule.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/do-you-avoid-reviewing-performance-without-metrics/rule.md b/rules/do-you-avoid-reviewing-performance-without-metrics/rule.md index c5d61b151e5..bc89cb82c9e 100644 --- a/rules/do-you-avoid-reviewing-performance-without-metrics/rule.md +++ b/rules/do-you-avoid-reviewing-performance-without-metrics/rule.md @@ -70,7 +70,7 @@ This is because performance is an emotional thing, sometimes it just \*feels\* s ### Samples -For sample code on how to measure performance for Windows application form, please refer to rule [Do you have tests for Performance?](/have-tests-for-performance/) on [Rules To Better Unit Tests](http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterUnitTests.aspx). +For sample code on how to measure performance for Windows application form, please refer to rule [Do you have tests for Performance?](/have-tests-for-performance/) on [Rules To Better Unit Tests](/rules-to-better-unit-tests/). ### Related Rule From 88c56e526a5bb1e59006245b519c123bc13e4aa6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 15 Feb 2024 01:02:46 +0000 Subject: [PATCH 2/2] Auto-fix Markdown files --- .../rule.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/rules/do-you-avoid-reviewing-performance-without-metrics/rule.md b/rules/do-you-avoid-reviewing-performance-without-metrics/rule.md index bc89cb82c9e..5d3ed78931f 100644 --- a/rules/do-you-avoid-reviewing-performance-without-metrics/rule.md +++ b/rules/do-you-avoid-reviewing-performance-without-metrics/rule.md @@ -17,14 +17,12 @@ redirects: [] If a client says: - ::: greybox *"This application is too slow, I don't really want to put up with such poor performance. Please fix."* ::: We don't jump in and look at the code and clean it up and reply with something like: - ::: greybox *"I've looked at the code and cleaned it up - not sure if this is suitable - please tell me if you are OK with the performance now."* ::: @@ -41,8 +39,6 @@ A better way is: * Reply to the customer: "It was 22 seconds, you asked for around 10 seconds. It is now 8 seconds." - - ::: good ![Figure: Good example – Add some code to check the timing, before fixing any performance issues (An example from SSW Code Auditor)](Code-Auditor-performance.jpg) ::: @@ -51,14 +47,12 @@ Also, never forget to do incremental changes in your tests! For example, if you are trying to measure the optimal number of processors for a server, do not go from 1 processor to 4 processors at once: - ::: bad ![Figure: Bad Example - Going from 1 to 4 all at once gives you incomplete measurements and data](1to4.png) ::: Do it incrementally, adding 1 processor each time, measuring the results, and then adding more: - ::: good ![Figure: Good Example - Going from 1 to 2, then measuring, then incrementally adding one more, measuring...](1234.png) ::: @@ -69,7 +63,6 @@ This is because performance is an emotional thing, sometimes it just \*feels\* s ### Samples - For sample code on how to measure performance for Windows application form, please refer to rule [Do you have tests for Performance?](/have-tests-for-performance/) on [Rules To Better Unit Tests](/rules-to-better-unit-tests/). ### Related Rule