{"id":14063427,"url":"https://github.com/microsoft/NetPerfTest","last_synced_at":"2025-07-29T15:33:10.750Z","repository":{"id":43256170,"uuid":"189775247","full_name":"microsoft/NetPerfTest","owner":"microsoft","description":"Network Performance Test","archived":false,"fork":false,"pushed_at":"2025-05-06T22:58:37.000Z","size":3201,"stargazers_count":56,"open_issues_count":5,"forks_count":14,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-07-26T18:47:11.578Z","etag":null,"topics":["msftnet"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-01T20:33:23.000Z","updated_at":"2025-06-27T08:23:27.000Z","dependencies_parsed_at":"2024-07-08T22:41:51.781Z","dependency_job_id":null,"html_url":"https://github.com/microsoft/NetPerfTest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/microsoft/NetPerfTest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FNetPerfTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FNetPerfTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FNetPerfTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FNetPerfTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/NetPerfTest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FNetPerfTest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267709614,"owners_count":24131922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["msftnet"],"created_at":"2024-08-13T07:03:20.209Z","updated_at":"2025-07-29T15:33:09.755Z","avatar_url":"https://github.com/microsoft.png","language":"PowerShell","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"readme":"# NetPerfTest Tool(s)\r\n\r\n## Description\r\n\r\nNetPerfTest is a collection of tools used to generate tests, run tests and collect network configuration, and performance statistics for diagnosis of networking performance issues.\r\n\r\n## Pre-Requisites\r\nThe goal here is to collect networking perf stats involving the Source and Destination machines that are needing diagnosis.\r\nTo accomplish this, we will leverage multiple Powershell scripts.\r\nIn order to be able to run Powershell scripts, we must set the powershell Execution Policy\r\n```PowerShell\r\nPowershell.exe Set-ExecutionPolicy RemoteSigned -Force\r\n```\r\n\r\n## Commands Generation\r\nNow that our pre-requisites have been met, we can start the testing process. \r\nFirst, we must generate a bunch of relevant networking tests between these machines.\r\nCreate a folder that will hold the output of these scripts, say: C:\\Temp\\MyDirectoryForTesting.\r\nNow that the folder is created, we're ready to generate the commands using the PERFTEST cmdlet : \r\n\r\n```PowerShell \r\n.\\PERFTEST.PS1 -DestIp DestinationMachineIP -SrcIP SourceMachineIP -OutDir \"C:\\Temp\\MyDirectoryForTesting\"\r\n```\r\n\r\nNote that the PERFTEST cmdlet generate the commands under a subdirectory msdbg.CurrentMachineName.perftest\r\n\r\nThe default configuration for the commands are outlined in Toolname.Config.json.\r\nIf you would like you use a different configuration, pass in the name of the configuration. If you would like to make your own configuration, the name of the configuration must start with the toolname and can be added to the respective json file. Refer to Toolname.Config.md for more information on creating json configs.\r\n\r\n```PowerShell \r\n.\\PERFTEST.PS1 -DestIp DestinationMachineIP -SrcIP SourceMachineIP -OutDir \"C:\\Temp\\MyDirectoryForTesting\" -Config 'Detail'\r\n```\r\n\r\n## Setup\r\nBefore proceeding to run the commands/tests that were generated above, we must enable Powershell Remoting. \r\nTo setup the machine(s), please run the following command on each machine you wish to test (example: Destination and Source machine)\r\n```PowerShell \r\nSetupTearDown.ps1 -Setup\r\n```\r\nWe also have a cleanup script that we recommend you run after collecting the results (more on that below, in the Cleanup section)\r\n\r\n## Running the tool, collecting results\r\nWe are now at the phase where we will run the tests against the Source and Destination Machines and collect results for offline troubleshooting.\r\nThe scripts use Powershell Remoting to kick off commands on the two machines to perform the networking tests.\r\nYou will need to provide the same Source and Destination IPs as you did for commands generation. In addition you must provide the path to the \r\ndirectory of commands that was generated in the Commands Generation phase above. Ex: msdbg.CurrentMachineName.perftest\r\n\r\nRunPerfTool was created as a powershell module with the idea of flexibility with its invocation (invoking from another script versus standalone invocations, etc)\r\n\r\nWe will thus need to import the Module like this: ```Import-Module -Force .\\runPerftool.psm1```\r\nWe will then invoke a single function in this module that will process all the commands and run them and gather the results. \r\nFor further help with this function, run ```Get-Help ProcessCommands```\r\n\r\nThe command to run tests is:\r\n```\r\nProcessCommands -DestIp DestinationMachineIP -SrcIp SourceMachineIP -CommandsDir C:\\Temp\\MyDirectoryForTesting\\msdbg.CurrentMachineName.perftest -SrcIpUserName SrcDomain\\SrcUserName -DestIpUserName DestDomain\\DestUserName\r\n```\r\n\r\nYou will be prompted for password for both credentials. It is a Secure-string so your password will not be displayed or stored in clear text at any point.\r\n\r\n```PowerShell commands\r\nImport-Module -Force .\\runPerftool.psm1\r\nProcessCommands -DestIp DestinationMachineIP -SrcIp SourceMachineIP -CommandsDir C:\\Temp\\MyDirectoryForTesting\\msdbg.CurrentMachineName.perftest -SrcIpUserName SrcDomain\\SrcUserName -DestIpUserName DestDomain\\DestUserName\r\nFor further help run \r\nGet-Help ProcessCommands\r\n```\r\n\r\nOnce the script is complete, you should see the zip files from DestinationMachineIp and SourceMachineIP machines under the \r\nCommandsDir folder you specified (ex: C:\\Temp\\MyDirectoryForTesting\\msdbg.CurrentMachineName.perftest)\r\n\r\nAt this point you are done! Don't forget to share the folder contents and run Cleanup step below.\r\n\r\n## Cleanup\r\nAfter finishing running the relevant tests, it is recommended to run the cleanup script to undo the steps that were done in the Setup stage.\r\nTo cleanup the machine(s), run the following command on each machine you leveraged for testing (Destination and Source machine)\r\n\r\n```PowerShell \r\nSetupTearDown.ps1 -Cleanup\r\n```\r\n\r\n## Contributing\r\n\r\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\r\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\r\nthe rights to use your contribution. For details, visit https://cla.microsoft.com.\r\n\r\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\r\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\r\nprovided by the bot. You will only need to do this once across all repos using our CLA.\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\r\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\r\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2FNetPerfTest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2FNetPerfTest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2FNetPerfTest/lists"}