Skip to content
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

feat: nicely display CPU affinity when running benchmarks #54

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

Arno500
Copy link
Contributor

@Arno500 Arno500 commented Nov 4, 2024

Related to [FEATURE] Improve CPU pinning reporting #49

Previously, when getting information on which CPU the benchmark was running, the string was not intelligently created, leading to really long outputs on CPUs with a lot of cores. Now, we try to be a little smarter:

  • [0, 1, 2, 3, 4, 5] becomes "0-5"
  • [0, 4, 2, 3, 7, 8, 9] becomes "0, 2-4, 7-9"

It should improve output readability and general UX.

@Arno500 Arno500 requested a review from ErwanAliasr1 November 4, 2024 18:46
@Arno500 Arno500 linked an issue Nov 4, 2024 that may be closed by this pull request
Copy link
Collaborator

@ErwanAliasr1 ErwanAliasr1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"feat: nicely display CPU affinity when running benchmarks"

Please replace 'feat:' by a 'where' statement, like "hwbench:"

@ErwanAliasr1
Copy link
Collaborator

You could also present a real use case in your commit message.

Before the commit:
[randread_cmdline_0] fio/cmdline/cmdline(M): 6 stressor pinned on CPU [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127] for 600s

With the commit:
[randread_cmdline_0] fio/cmdline/cmdline(M): 6 stressor pinned on CPU [0-127] for 600s

@Arno500 Arno500 force-pushed the issue-49 branch 3 times, most recently from 775ff02 to 05ee865 Compare November 5, 2024 11:29
Related to [FEATURE] Improve CPU pinning reporting #49

Previously, when getting information on which CPU the benchmark was running, the string was not intelligently created, leading to really long outputs on CPUs with a lot of cores, like
Now, we try to be a little smarter:
- [0, 1, 2, 3, 4, 5] becomes "0-5"
- [0, 4, 2, 3, 7, 8, 9] becomes "0, 2-4, 7-9"
- [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127] becomes "0-127"

It should improve output readability and general UX.
@ErwanAliasr1 ErwanAliasr1 merged commit 5ecb90b into main Nov 5, 2024
4 checks passed
@ErwanAliasr1 ErwanAliasr1 deleted the issue-49 branch November 5, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Improve CPU pinning reporting
2 participants