
此時,沒有再添加額外的控制器。上述中的參數設置解釋:
Number of Threads(users): 啟用的並發線程個數
Ramp0up Period(in seconds):在多少秒之內將上述並發的線程啟動起來
Loop Count:控制循環次數
說明:
一個常見的誤解,認為Number of Threads(users)設置為100,Ramp-Up Period(in seconds)設置為1,就是每秒發起100個請求量(錯誤)。
上述的設置,表示在1s內啟動100個線程,之后,jmeter便以最大限度的100個並發進行壓測,不能保證1s內只有100個請求。
我們用上述的設置,對某個接口進行壓測,發現:

Delay before each affected sampleer下的Target throughput(in samples per minute)設置的值為6000(由於單位是一分鍾,如果要求QPS為100,則該值設置為60*100=6000)
Calculate Throughput based on的選項有5個(這里我選擇all active threads),分別是:
1)This thread only:控制每個線程的吞吐量,選擇這種模式時,總的吞吐量為設置的target Throughput 乘以改線程的數量。
2)all active threads:設置的target Throughput 將分配在每個活躍線程上,每個活躍線程在上次運行結束后等待合理的時間再次運行。活躍線程指同一時刻同時運行的線程。
3)all active threads in current thread group:設置的target Throughput將分配在當前線程組的每一個活躍線程上,當測試計划中只有一個線程時,改選項和all active threads選項的效果完全相同。
4)all active threads(shared):與all active threads的選項基本相同,唯一的區別是,每個活躍線程都會在所有活躍線程上運行一次結束后等待合理的時間后再次運行。
5)all active threads in current thread group(shared):與all active threads in current thread group 基本相同,唯一的區別是,每個活躍線程都會在所有活躍線程的上一次運行結束后等待合理的時間再次運行。
————————————————