Skip to content

Integration benchmark tests - #1298

Merged
WojciechNagorski merged 6 commits into
sshnet:developfrom
WojciechNagorski:integration-benchmark-tests
Jan 28, 2024
Merged

Integration benchmark tests#1298
WojciechNagorski merged 6 commits into
sshnet:developfrom
WojciechNagorski:integration-benchmark-tests

Conversation

@WojciechNagorski

@WojciechNagorskiWojciechNagorski commented Jan 27, 2024

Copy link
Copy Markdown
Collaborator

2023.0.0

SshClient

MethodMeanErrorStdDevAllocated
Connect93.18 ms1.816 ms2.162 ms165.78 KB

Master

SshClient

MethodMeanErrorStdDevAllocated
Connect92.74 ms1.645 ms1.285 ms158.17 KB

After change

SftpClient on this branch:

MethodMeanErrorStdDevAllocated
Connect95.89 ms1.907 ms2.735 ms190.51 KB
ConnectAsync95.91 ms1.877 ms2.867 ms192.3 KB
UploadAndDownload16.48 ms0.236 ms0.221 ms54.45 KB

SshClient on this branch:

MethodMeanErrorStdDevAllocated
Connect35.644 ms0.4266 ms0.3782 ms140.41 KB
ConnectAsync35.572 ms0.2993 ms0.2653 ms142.17 KB
ConnectAndRunCommand92.598 ms1.7199 ms1.9807 ms156.12 KB
ConnectAsyncAndRunCommand93.462 ms1.8312 ms2.7408 ms157.86 KB
RunCommand6.242 ms0.0646 ms0.0604 ms77.46 KB

ScpClient on this branch:

MethodMeanErrorStdDevAllocated
Connect35.89 ms0.389 ms0.345 ms140.51 KB
ConnectAsync35.77 ms0.441 ms0.391 ms142.14 KB
ConnectUploadAndDownload109.93 ms2.189 ms2.342 ms184.81 KB
UploadAndDownload22.89 ms0.432 ms0.404 ms42.46 KB

@WojciechNagorski

Copy link
Copy Markdown
CollaboratorAuthor

Of course the times are not deterministic, but they are good enough. However, allocations are 100 percent deterministic.

@Rob-HagueRob-Hague left a comment

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.

Cool!

I think it could be useful for getting profiles for different scenarios. I got it to work with [EtwProfiler] with a reference to BenchmarkDotNet.Diagnostics.Windows. Which is better EventPipeProfiler or EtwProfiler?

Comment threadsrc/Renci.SshNet/Common/SshDataStream.cs Outdated
WojciechNagorskiand others added 2 commits January 27, 2024 22:32
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
@WojciechNagorski

Copy link
Copy Markdown
CollaboratorAuthor

@Rob-Hague Can you check if is ok?

@Rob-HagueRob-Hague left a comment

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.

Nice

@WojciechNagorski
WojciechNagorski merged commit 0371af9 into sshnet:developJan 28, 2024
@WojciechNagorski
WojciechNagorski deleted the integration-benchmark-tests branch January 28, 2024 10:05
@WojciechNagorski

Copy link
Copy Markdown
CollaboratorAuthor

This issue has been fixed in the 2024.0.0 version.

This was referenced Aug 12, 2026
Sign up for freeto 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

@WojciechNagorski@Rob-Hague