Here is an official tool but seems old: https://github.com/elastic/logstash-benchmark-tools
Google provides a way but for security: https://cloud.google.com/blog/products/containers-kubernetes/gke-cis-benchmarks-deliver-security-best-practices
Elastic has a tool Rally but for elasticsearch: https://www.elastic.co/jp/blog/benchmarking-and-sizing-your-elasticsearch-cluster-for-logs-and-metrics