sshnet / SSH.NET

SSH.NET is a Secure Shell (SSH) library for .NET, optimized for parallelism.
http://sshnet.github.io/SSH.NET/
MIT License
3.88k stars 919 forks source link

Integration benchmark tests #1298

Closed WojciechNagorski closed 5 months ago

WojciechNagorski commented 5 months ago

2023.0.0

SshClient Method Mean Error StdDev Allocated
Connect 93.18 ms 1.816 ms 2.162 ms 165.78 KB

Master

SshClient Method Mean Error StdDev Allocated
Connect 92.74 ms 1.645 ms 1.285 ms 158.17 KB

After change

SftpClient on this branch:

Method Mean Error StdDev Allocated
Connect 95.89 ms 1.907 ms 2.735 ms 190.51 KB
ConnectAsync 95.91 ms 1.877 ms 2.867 ms 192.3 KB
UploadAndDownload 16.48 ms 0.236 ms 0.221 ms 54.45 KB
SshClient on this branch: Method Mean Error StdDev Allocated
Connect 35.644 ms 0.4266 ms 0.3782 ms 140.41 KB
ConnectAsync 35.572 ms 0.2993 ms 0.2653 ms 142.17 KB
ConnectAndRunCommand 92.598 ms 1.7199 ms 1.9807 ms 156.12 KB
ConnectAsyncAndRunCommand 93.462 ms 1.8312 ms 2.7408 ms 157.86 KB
RunCommand 6.242 ms 0.0646 ms 0.0604 ms 77.46 KB
ScpClient on this branch: Method Mean Error StdDev Allocated
Connect 35.89 ms 0.389 ms 0.345 ms 140.51 KB
ConnectAsync 35.77 ms 0.441 ms 0.391 ms 142.14 KB
ConnectUploadAndDownload 109.93 ms 2.189 ms 2.342 ms 184.81 KB
UploadAndDownload 22.89 ms 0.432 ms 0.404 ms 42.46 KB
WojciechNagorski commented 5 months ago

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

WojciechNagorski commented 5 months ago

@Rob-Hague Can you check if is ok?

WojciechNagorski commented 4 months ago

This issue has been fixed in the 2024.0.0 version.