Complete the code to define the main goal of load testing.
def load_testing_goal(): return "To measure system performance under [1] load"
Load testing aims to measure how a system performs under heavy load, simulating many users or transactions.
Complete the code to specify the tool commonly used for load testing.
def common_load_testing_tool(): return "[1]"
Apache JMeter is a popular open-source tool used for load testing web applications.
Fix the error in the code that sets the number of virtual users for load testing.
virtual_users = [1] # Number of users to simulate
The number of virtual users must be an integer, so 10 is correct. Using a string or None will cause errors.
Fill both blanks to create a dictionary that stores response times for each user during load testing.
response_times = {user[1]: [2] for user in range(1, 6)}The key should be 'user_id' to identify each user, and the value should be the response time from a function call.
Fill all three blanks to filter response times greater than 200 ms and create a summary dictionary.
slow_responses = {user[1]: time for user, time in response_times.items() if time [2] [3]We use 'user_id' as key, filter times greater than (>) 200 milliseconds to find slow responses.