76 lines
2.0 KiB
Python
Raw Normal View History

"""
Built-in test presets for the traffic generator.
"""
PRESETS = {
'quick_icmp': {
'description': 'Quick ICMP ping test to verify connectivity',
'flow': {
'protocol': 'icmp',
'frame_size': 64,
'rate_pps': 10,
'duration': 10,
},
},
'udp_flood_small': {
'description': 'UDP flood with 64-byte frames at 1000 pps',
'flow': {
'protocol': 'udp',
'dst_port': 5001,
'frame_size': 64,
'rate_pps': 1000,
'duration': 30,
},
},
'udp_flood_large': {
'description': 'UDP flood with 1518-byte frames at 500 pps',
'flow': {
'protocol': 'udp',
'dst_port': 5001,
'frame_size': 1518,
'rate_pps': 500,
'duration': 30,
},
},
'rfc2544_throughput': {
'description': 'RFC 2544 throughput test across standard frame sizes',
'flow': {
'protocol': 'udp',
'dst_port': 5001,
'frame_size': 64,
'rate_pps': 10000,
'duration': 60,
},
'test': {
'type': 'throughput',
'frame_sizes': [64, 128, 256, 512, 1024, 1280, 1518],
'trial_duration': 60,
'acceptable_loss_pct': 0.0,
},
},
'rfc2544_latency': {
'description': 'RFC 2544 latency test at moderate rate',
'flow': {
'protocol': 'icmp',
'frame_size': 64,
'rate_pps': 100,
'duration': 30,
},
'test': {
'type': 'latency',
'frame_sizes': [64, 512, 1518],
'trial_duration': 30,
},
},
'tcp_session': {
'description': 'TCP SYN flood at 100 pps (for testing ACL/firewall)',
'flow': {
'protocol': 'tcp',
'dst_port': 80,
'frame_size': 64,
'rate_pps': 100,
'duration': 30,
},
},
}