That's right, you should use something like iperf3 or openspeedtest server on one pc and client on the other PC so test data isn't generated on the switch but on one of the devices.
That way data is just passing through the switch and not being generated by the switch.