-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMain.java
More file actions
25 lines (23 loc) · 787 Bytes
/
Main.java
File metadata and controls
25 lines (23 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.yurii.salimov.lesson12.task02;
/**
* 12.2 Написать программу для стресс-тестирования веб-серверов.
*
* @author Yuriy Salimov (yuriy.alex.salimov@gmail.com)
* @version 1.0
*/
public class Main {
public static void main(String[] args) {
try {
final Parameters parameters = Parameters.getInstance();
System.out.println("Stress: START");
final Stress stress = new Stress(parameters);
stress.start();
Thread.sleep(parameters.getTimer());
System.out.println("Stress: INTERRUPT");
stress.interrupt();
} catch (Exception ex) {
ex.printStackTrace();
}
System.out.println("Stress: EXIT");
}
}