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

[Impacted Area Based PR testing] Fix script timing with recent test plans #16437

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yutongzhang-microsoft
Copy link
Contributor

Description of PR

In the previous implementation, we retrieved 5 test case entries from Kusto to calculate the total running time of a script. However, the query included the condition | where FilePath == '{script}', and since each script may contain multiple test cases, this approach only sampled 5 random test cases from the script. As a result, the calculated average running time was inaccurate. In this PR, we resolve the issue by selecting the most recent 5 test plans instead, ensuring that we account for all test cases executed in the script.

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
    • Add ownership here(Microsft required only)
  • Test case improvement

Back port request

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

Approach

What is the motivation for this PR?

In the previous implementation, we retrieved 5 test case entries from Kusto to calculate the total running time of a script. However, the query included the condition | where FilePath == '{script}', and since each script may contain multiple test cases, this approach only sampled 5 random test cases from the script. As a result, the calculated average running time was inaccurate. In this PR, we resolve the issue by selecting the most recent 5 test plans instead, ensuring that we account for all test cases executed in the script.

How did you do it?

In this PR, we resolve the issue by selecting the most recent 5 test plans instead, ensuring that we account for all test cases executed in the script.

How did you verify/test it?

Any platform specific information?

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

Documentation

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yutongzhang-microsoft yutongzhang-microsoft changed the title [Impacted Area Based PR testing] Fix get time error [Impacted Area Based PR testing] Fix script timing with recent test plans Jan 10, 2025
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

2 participants