Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Added MS build benchmarking#23

Open
baimamboukar wants to merge 118 commits into
mainfrom
msbuild-benchmarks
Open

Added MS build benchmarking#23
baimamboukar wants to merge 118 commits into
mainfrom
msbuild-benchmarks

Conversation

@baimamboukar

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread scripts/benchmark_runner_windows.py Outdated

def download_file(url, filename):
""" Download file from url and save it to filename"""
subprocess.run(['powershell', 'Invoke-WebRequest', '-Uri',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Delegating this to PowerShell is not very elegant. I'm sure there is an easy way to download files purely in Python.

Comment thread scripts/benchmark_runner_linux.py Outdated

# Extract the tar.gz file
# extract_command = f"tar -xzf {tar_gz_file} -C {extract_path}"
subprocess.run(["tar", "-xzf", tar_gz_file,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it be possible to not use tar here, just pure python? (It makes it more portable and easier to test locally)

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! Sure ✅

Comment on lines +17 to +18
SDK_VERSION = "6.0.300"
SDK_DAILY_VERSION = "8.0.1xx"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

dotnet --version gives you back the version - it is not necessary to hardcode these values (Also hardcoding these values may lead to a mismatch between the hardcoded version and the actual version)

WORKING_DIR = "msbuild-performance-test"
DOTNET_BASE_VERSION_URL_LINUX = "https://download.visualstudio.microsoft.com/download/pr/dc930bff-ef3d-4f6f-8799-6eb60390f5b4/1efee2a8ea0180c94aff8f15eb3af981/dotnet-sdk-6.0.300-linux-x64.tar.gz"
DOTNET_DAILY_VERSION_URL_LINUX = "https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-x64.tar.gz"
TEST_SOLUTION_REPO_URL = "https://github.com/marcin-krystianc/TestSolutions.git"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See NuGet benchmarks, they check out the repo at specific commit hash (e.g.: https://github.com/G-Research/DotNetPerfMonitor/blob/main/scripts/perftests/testCases/LargeAppCPM64-142722b.ps1#L5).
It is important to do that because we want to measure performance for exactly the same state of the repo each time.

DOTNET_BASE_VERSION_URL_LINUX = "https://download.visualstudio.microsoft.com/download/pr/dc930bff-ef3d-4f6f-8799-6eb60390f5b4/1efee2a8ea0180c94aff8f15eb3af981/dotnet-sdk-6.0.300-linux-x64.tar.gz"
DOTNET_DAILY_VERSION_URL_LINUX = "https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-x64.tar.gz"
TEST_SOLUTION_REPO_URL = "https://github.com/marcin-krystianc/TestSolutions.git"
TEST_REPO_NAME = "TestSolutions"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants