???????????????????????????????????????????????????????????????????

???????? ???http???????url??params??????????????????????????????????????????

??????????????????????????????????????????????????????????????谓??????????

???????????????????????????????????????????????????????JDK?????HttpServer???????????卸?JDK???????些???蔚???????????????????????????????????????????????????????

????????位????????????????些?????????????????????????????????1~2??????锟�??????????????????????????????????渭????????????????????写??????????位??????????????

??????????????????????????????????? http://127.0.0.1/getlog?id=123&path=testlog&type=r??????????????testlog????????????????devlog?????????????????????位???????????????????位?????????????????????

??????????????url?械?????????????????锟�?

????Map Params = (Map) httpExchange.getAttribute(“parameters”);

????JDK?????????????????????getAttribute??

????Filter modules may store arbitrary objects with HttpExchange instances as an out-of-band communication mechanism. Other Filters or the exchange handler may then access these objects.

????????????????????????????????????????????????????写????????????

????1000???????路?10000?????????????????????????????????????????????????????????????????????1000??????????????????????

????httpExchange.getAttribute()???????????????锟�??????????????????

????public class HttpServersPerfTest extends BaseCase {

????private static final Log logger = LogFactory.getLog(AlisaNodeHttpServersPerfTest.class);

????int maxThread = 1000;

????private int totalTask = 1000;

????@Test

????public void testRequestRunningLog() throws InterruptedException {

????execute();

????}

????private void execute() throws InterruptedException {

????ExecutorService pool = Executors.newFixedThreadPool(maxThread);

????final CountDownLatch countDownLatch = new CountDownLatch(totalTask);

????for (int n = 0; n < totalTask; n++) {

????pool.execute(new RequestHttpServerThread(countDownLatch));

????}

????try {

????countDownLatch.await();

????System.err.println(“==============>>>>> ?路?????” );

????} catch (InterruptedException e) {

????e.printStackTrace();

????}

????}

????private class RequestHttpServerThread implements Runnable {

????private CountDownLatch countDownLatch;

????public RequestHttpServerThread(CountDownLatch countDownLatch) {

????this.countDownLatch = countDownLatch;

????}

????/**

????* ??????校?????????????????????????????????????????薪??????写??

????* ?????????????????????斜??

????*/