Skip to content

[performance_meter] Add performance_meter tests#16842

Merged
Blueve merged 14 commits intosonic-net:masterfrom
Xichen96:dev/xichenlin/performance-meter
Feb 25, 2025
Merged

[performance_meter] Add performance_meter tests#16842
Blueve merged 14 commits intosonic-net:masterfrom
Xichen96:dev/xichenlin/performance-meter

Conversation

@Xichen96
Copy link
Copy Markdown
Contributor

@Xichen96 Xichen96 commented Feb 7, 2025

Description of PR

Add performance meter tests

hld: #15356

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

To better understand the performance of certain operation on different hwsku, and make sure there are no unexpected performance changes.

How did you do it?

Add new test. User can write config file and code will perform and measure the performance of different operations.

How did you verify/test it?

Run test on different testbeds.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

WIP 2

WIP 3

WIP 4

WIP 5

WIP 6

WIP 7

WIP 8

WIP 9

WIP 10

WIP 11

WIP 12

WIP 13

WIP 14

WIP 15

WIP 16

WIP 17

WIP 18

WIP 19

WIP 20

WIP 21

WIP 22

WIP 23

WIP 24

WIP 25

WIP 26

WIP 27

WIP 28

WIP 29

WIP 30

WIP 31
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

# Timing will only start after the first blocking part of operation
# is over. The op should make sure op is started correctly and ended
# correctly. If either part is unsuccessful, op should yeild False and
# log the error, otherwise yielding True is expected.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In short, the op defines the procedure:

  1. OP - Do something
  2. OP - yield or return
  3. Start timer and success criteria checker
  4. OP - Do something that we want to measure

Is this statement right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes

@Blueve
Copy link
Copy Markdown
Collaborator

Blueve commented Feb 10, 2025

Can you also link the HLD to this PR's description?

# take all results that passed op precheck.


def random_success_20_perc(duthost, **kwarg):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a sample implementation, right?
If user use this one, their test will got ~20% passing rate

# process results of all runs, so there could be a success criteria
# stats function, named with a "_stats" suffix, taking the same
# variables as its single run version, like "bgp_up_stats". It will
# take all results that passed op precheck.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The _stats is special, I saw the example below:

def random_success_20_perc_stats(passed_op_precheck, **kwarg):

Can you explain why it need **kwarg?
And can you extend the sample method to output the actual success rate? Then it could be more clear.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If we define a mean, or a p99, stuff like that, they will be passed to function through the kwarg

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

############################
parser.addoption("--dpu-pattern", action="store", default="all", help="dpu host name")

#################################
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Make this configurable in next PR

@Blueve Blueve merged commit 7bcd1f4 into sonic-net:master Feb 25, 2025
17 checks passed
nissampa pushed a commit to nissampa/sonic-mgmt_dpu_test that referenced this pull request Mar 4, 2025
What is the motivation for this PR?
To better understand the performance of certain operation on different hwsku, and make sure there are no unexpected performance changes.

How did you do it?
Add new test. User can write config file and code will perform and measure the performance of different operations.

How did you verify/test it?
Run test on different testbeds.
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Mar 15, 2025
What is the motivation for this PR?
To better understand the performance of certain operation on different hwsku, and make sure there are no unexpected performance changes.

How did you do it?
Add new test. User can write config file and code will perform and measure the performance of different operations.

How did you verify/test it?
Run test on different testbeds.
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.

3 participants