Skip to content
ScottSymsPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gentcp

Small Rust command-line utility for generating rate-limited TCP traffic so you can test programs that consume data from a TCP source.

Features

  • Listens on a configurable socket address
  • Sends newline-delimited random strings to every connected client
  • Applies the configured message rate per connected client
  • Prints an aggregate summary every N seconds

Usage

cargo run -- --bind 127.0.0.1:9000 --messages-per-second 1000 --message-size 100 --summary-interval 10

Example output:

listening on 127.0.0.1:9000 | per-client rate=1,000 msg/s | message_size=100 bytes | summary=10s
client connected: 127.0.0.1:53268 | active_clients=1
10s summary: clients=1 messages=10,000 bytes=1,000,000 msg_rate=1,000.00/s byte_rate=100,000.00/s totals(messages=10,000, bytes=1,000,000)

message-size is the full size of each emitted random string, including the trailing newline.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages