BankingAppBenchmarkSuite constructor
BankingAppBenchmarkSuite()
Implementation
BankingAppBenchmarkSuite() : super(
name: 'Banking App Performance Suite',
tests: [
// Overhead comparison
InterceptorOverheadBenchmark(
endpoint: 'https://httpbin.org/delay/0.1',
iterations: 15,
),
// Lightweight requests
HttpInterceptorBenchmark(
name: 'Simple GET',
endpoint: 'https://jsonplaceholder.typicode.com/posts/1',
),
// Heavy JSON response
HttpInterceptorBenchmark(
name: 'Heavy JSON GET',
endpoint: 'https://jsonplaceholder.typicode.com/users',
iterations: 15,
),
// POST with payload
HttpInterceptorBenchmark(
name: 'Banking POST',
endpoint: 'https://httpbin.org/post',
httpMethod: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer fake_token_benchmark',
'X-Banking-Session': 'session_benchmark',
'X-Request-ID': 'req_benchmark',
'X-API-Version': '2.1',
},
requestBody: jsonEncode({
'account_id': 'ACC_BENCHMARK',
'amount': '1250.75',
'currency': 'EUR',
'description': 'Performance benchmark transfer',
'metadata': {
'benchmark': true,
'timestamp': DateTime.now().toIso8601String(),
'device': 'flutter_test',
}
}),
iterations: 10,
),
// Headers processing
HttpInterceptorBenchmark(
name: 'Complex Headers',
endpoint: 'https://httpbin.org/headers',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer fake_token_with_long_jwt_content_here',
'X-Banking-Session': 'very_long_session_id_with_multiple_parts',
'X-Request-ID': 'req_complex_headers_benchmark_test',
'X-API-Version': '2.1',
'User-Agent': 'BankingApp/1.0 Flutter Performance Test Suite',
'X-Account-Type': 'premium_checking',
'X-Client-Version': '1.2.3-benchmark',
'X-Device-ID': 'device_id_for_benchmark_testing',
'X-Session-Token': 'session_token_with_additional_metadata',
},
iterations: 15,
),
],
);