{"id":5347,"date":"2022-06-03T12:00:42","date_gmt":"2022-06-03T04:00:42","guid":{"rendered":"https:\/\/www.xttblog.com\/?p=5347"},"modified":"2022-06-03T12:00:42","modified_gmt":"2022-06-03T04:00:42","slug":"%e8%ae%b0%e4%b8%80%e6%ac%a1jmeter%e5%8e%8b%e6%b5%8bhttp%e5%92%8c-https-%e5%8d%8f%e8%ae%aert%e5%b7%ae%e8%b7%9d%e9%9d%9e%e5%b8%b8%e5%a4%a7%e7%9a%84%e6%80%a7%e8%83%bd%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=5347","title":{"rendered":"\u8bb0\u4e00\u6b21JMeter\u538b\u6d4bHTTP\u548c HTTPS \u534f\u8baeRT\u5dee\u8ddd\u975e\u5e38\u5927\u7684\u6027\u80fd\u95ee\u9898"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u95ee\u9898\u80cc\u666f<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u4f7f\u7528 JMeter \u538b\u6d4b\u65f6\uff0c\u53d1\u73b0\u540c\u4e00\u540e\u7aef\u670d\u52a1\uff0c\u5728\u5355\u673a 500 \u5e76\u53d1\u4e0b\uff0cHTTP \u548c HTTPS \u534f\u8bae\u538b\u6d4b RT \u5dee\u8ddd\u975e\u5e38\u5927\u3002\u540c\u65f6\u89c2\u6d4b\u540e\u7aef\u670d\u52a1\u5404\u76d1\u63a7\u6307\u6807\u6c34\u4f4d\u90fd\u5f88\u4f4e\uff0c\u56e0\u6b64\u6000\u7591\u6027\u80fd\u74f6\u9888\u5728 JMeter \u65bd\u538b\u5ba2\u6237\u7aef\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u95ee\u9898\u5206\u6790<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u5207\u5165\u70b9\uff1a\u5783\u573e\u56de\u6536<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u9996\u5148\u5728\u65bd\u538b\u673a\u89c2\u5bdf\u5230 CPU \u4f7f\u7528\u7387\u548c\u5185\u5b58\u4f7f\u7528\u7387\u90fd\u5f88\u9ad8\uff0c\u8be6\u7ec6\u770b\u4e0b\u5404\u7ebf\u7a0b CPU\u3001\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>top -Hp {pid}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u53d1\u73b0\u8fdb\u7a0b\u7684 CPU \u4f7f\u7528\u7387\u5c06\u8fd1\u6253\u6ee1\uff0c\u5176\u4e2d GC \u7ebf\u7a0b CPU \u4f7f\u7528\u7387\u5f88\u9ad8<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/xmt1139057136\/xttblog\/2022\/06\/jmeter.png\" alt=\"jemter CPU \u4f7f\u7528\u7387\u5c06\u8fd1\u6253\u6ee1\" \/><figcaption>jemter CPU \u4f7f\u7528\u7387\u5c06\u8fd1\u6253\u6ee1<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u518d\u770b\u4e0b gc \u7684\u9891\u7387\u548c\u8017\u65f6\uff0c\u53d1\u73b0\u6bcf\u79d2\u90fd\u6709 YoungGC\uff0c\u4e14\u7d2f\u8ba1\u8017\u65f6\u6bd4\u8f83\u957f\uff0c\u56e0\u6b64\u5148\u4ece\u9891\u7e41 GC \u5165\u624b\uff0c\u5b9a\u4f4d\u95ee\u9898\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>java\/bin\/jstat\u00a0-gcutil\u00a0{pid}\u00a01000<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/xmt1139057136\/xttblog\/2022\/06\/jmeter0.png\" alt=\"jstat -gcutil\" \/><figcaption>jstat -gcutil<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u538b\u6d4b\u8fc7\u7a0b\u4e2d\uff0c\u5bf9 JMeter \u7684\u8fd0\u884c\u8fdb\u7a0b\u505a\u4e86 HeapDump \u540e\uff0c\u5206\u6790\u4e0b\u5806\u5185\u5b58\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/xmt1139057136\/xttblog\/2022\/06\/jmeter1.png\" alt=\"JMeter \u8fdb\u7a0b HeapDump\" \/><figcaption>JMeter \u8fdb\u7a0b HeapDump<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u4ee5\u770b\u5230 cacheMap \u5bf9\u8c61\u5360\u7528\u4e86 93.3%\u7684\u5185\u5b58\uff0c\u800c\u5b83\u53c8\u88ab SSLSessionContextImpl \u7c7b\u5f15\u7528\uff0c\u5206\u6790\u4e0b\u6e90\u7801\uff0c\u53ef\u4ee5\u770b\u51fa\uff0c\u6bcf\u4e2a SSLSessionContextImpl \u5bf9\u8c61\u6784\u9020\u65f6\uff0c\u90fd\u4f1a\u521d\u59cb\u5316 sessionHostPortCache \u548c sessionCache \u4e24\u4e2a\u8f6f\u5f15\u7528 Cache\u3002\u56e0\u4e3a\u662f\u8f6f\u5f15\u7528\uff0c\u6240\u4ee5\u5728\u5185\u5b58\u4e0d\u8db3\u65f6 JVM \u624d\u4f1a\u56de\u6536\u6b64\u7c7b\u5bf9\u8c61\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u9ed8\u8ba4\u7f13\u5b58\u5927\u5c0f\nprivate final static int DEFAULT_MAX_CACHE_SIZE = 20480;\n\n\/\/ package private\nSSLSessionContextImpl() {\n    cacheLimit = getDefaultCacheLimit();    \/\/ default cache size\uff0c\u8fd9\u91cc\u9ed8\u8ba4\u662f20480\n    timeout = 86400;                        \/\/ default, 24 hours\n\n    \/\/ use soft reference\n    \/\/ \u8fd9\u91cc\u521d\u59cb\u5316\u4e862\u4e2a\u9ed8\u8ba4\u5927\u5c0f20480\u7684\u7f13\u5b58\uff0c\u662f\u9891\u7e41GC\u7684\u539f\u56e0\n    sessionCache = Cache.newSoftMemoryCache(cacheLimit, timeout);\n    sessionHostPortCache = Cache.newSoftMemoryCache(cacheLimit, timeout);\n}\n\n\/\/ \u83b7\u53d6\u9ed8\u8ba4\u7f13\u5b58\u5927\u5c0f\nprivate static int getDefaultCacheLimit() {\n    try {\n        int defaultCacheLimit = GetIntegerAction.privilegedGetProperty(\n                \"javax.net.ssl.sessionCacheSize\", DEFAULT_MAX_CACHE_SIZE);\n\n        if (defaultCacheLimit &gt;= 0) {\n            return defaultCacheLimit;\n        } else if (SSLLogger.isOn &amp;&amp; SSLLogger.isOn(\"ssl\")) {\n            SSLLogger.warning(\n                \"invalid System Property javax.net.ssl.sessionCacheSize, \" +\n                \"use the default session cache size (\" +\n                DEFAULT_MAX_CACHE_SIZE + \") instead\");\n        }\n    } catch (Exception e) {\n        \/\/ unlikely, log it for safe\n        if (SSLLogger.isOn &amp;&amp; SSLLogger.isOn(\"ssl\")) {\n            SSLLogger.warning(\n                \"the System Property javax.net.ssl.sessionCacheSize is \" +\n                \"not available, use the default value (\" +\n                DEFAULT_MAX_CACHE_SIZE + \") instead\");\n        }\n    }\n\n    return DEFAULT_MAX_CACHE_SIZE;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7\u4e0a\u8ff0\u4ee3\u7801\uff0c\u53d1\u73b0 sessionCache \u548c sessionHostPortCache \u7f13\u5b58\u9ed8\u8ba4\u5927\u5c0f\u662f DEFAULT_MAX_CACHE_SIZE\uff0c\u4e5f\u5c31\u662f 20480\u3002\u5bf9\u4e8e\u6211\u4eec\u538b\u6d4b\u7684\u573a\u666f\u6765\u8bf4\uff0c\u5982\u679c\u6bcf\u6b21\u8bf7\u6c42\u91cd\u65b0\u5efa\u7acb\u8fde\u63a5\uff0c\u90a3\u4e48\u5c31\u6839\u672c\u4e0d\u9700\u8981\u8fd9\u5757\u7f13\u5b58\u3002\u518d\u770b\u4e0b\u4ee3\u7801\u903b\u8f91\uff0c\u53d1\u73b0\u5176\u5b9e\u53ef\u4ee5\u901a\u8fc7<code>javax.net.ssl.sessionCacheSize<\/code>\u6765\u8bbe\u7f6e\u7f13\u5b58\u7684\u5927\u5c0f\uff0c\u5728 JMeter \u542f\u52a8\u65f6\uff0c\u6dfb\u52a0 JVM \u53c2\u6570<code>-Djavax.net.ssl.sessionCacheSize=1<\/code>\uff0c\u5c06\u7f13\u5b58\u5927\u5c0f\u8bbe\u7f6e\u4e3a 1\uff0c\u91cd\u65b0\u538b\u6d4b\u9a8c\u8bc1\uff0c\u89c2\u5bdf GC\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/xmt1139057136\/xttblog\/2022\/06\/jmeter2.png\" alt=\"JMeter\" \/><figcaption>JMeter<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u4ee5\u770b\u51fa\uff0cYGC \u660e\u663e\u53d8\u5c11\u4e86\uff0c\u4ece 1 \u79d2 1 \u6b21\uff0c\u53d8\u6210\u4e86 5-6 \u79d2 1 \u6b21\u3002\u90a3\u4e48\u89c2\u5bdf\u4e0b\u538b\u6d4b\u7684 RT\uff0c\u7ed3\u679c\u3002\u3002\u3002\u7adf\u7136\u8fd8\u662f 1800ms\uff0c\u672c\u6765 100ms \u7684\u670d\u52a1\u88ab\u538b\u6210 1800ms\uff0c\u770b\u6765\u95ee\u9898\u4e0d\u5728\u4e8e SSLSession \u7684\u7f13\u5b58\u3002\u518d\u56de\u5230 GC \u7684\u8017\u65f6\u5206\u6790\u90e8\u5206\uff0c\u4ed4\u7ec6\u770b\u4e0b\uff0c\u5176\u5b9e Full GC \u53ea\u6709 1 \u6b21\uff0c\u963b\u585e\u6027\u7684\u8017\u65f6\u5e76\u4e0d\u591a\uff0cYoung GC \u867d\u7136\u9891\u7e41\uff0c\u4f46\u963b\u585e\u65f6\u95f4\u5f88\u77ed\uff0c\u4e5f\u4e0d\u81f3\u4e8e\u5c06 SSL \u52a0\u89e3\u5bc6\u7684 CPU \u8ba1\u7b97\u65f6\u95f4\u7247\u5168\u90e8\u62a2\u5360\u3002\u770b\u8d77\u6765\u538b\u529b\u5c31\u662f\u5355\u7eaf\u7684 SSL \u63e1\u624b\u6b21\u6570\u591a\uff0c\u9020\u6210\u4e86\u6027\u80fd\u74f6\u9888\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u8c03\u6574\u601d\u8def\uff1a\u4e3a\u4ec0\u4e48\u9891\u7e41 SSL \u63e1\u624b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u56de\u5230\u95ee\u9898\u80cc\u666f\uff0c\u6211\u4eec\u662f\u5728\u505a\u538b\u529b\u6d4b\u8bd5\uff0c\u5355\u673a\u4f1a\u8dd1\u5f88\u9ad8\u7684\u5e76\u53d1\u6a21\u62df\u7528\u6237\u91cf\uff0c\u51fa\u4e8e\u6027\u80fd\u8003\u8651\uff0c\u5b8c\u5168\u53ef\u4ee5\u4e00\u6b21\u63e1\u624b\u540e\u5171\u4eab SSL \u8fde\u63a5\uff0c\u540e\u7eed\u4e0d\u518d\u63e1\u624b\uff0c\u4e3a\u4ec0\u4e48 JMeter \u4f1a\u5982\u6b64\u9891\u7e41\u63e1\u624b\u5462\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e26\u7740\u8fd9\u4e2a\u95ee\u9898\uff0c\u770b\u4e86\u4e0b JMeter \u5b98\u65b9\u6587\u6863\uff0c\u679c\u7136\u6709\u60ca\u559c\uff01<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/xmt1139057136\/xttblog\/2022\/06\/jmeter3.png\" alt=\"JMeter \u5b98\u65b9\u6587\u6863\" \/><figcaption>JMeter \u5b98\u65b9\u6587\u6863<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u539f\u6765 JMeter \u6709 2 \u4e2a\u5f00\u5173\u5728\u63a7\u5236\u662f\u5426\u91cd\u7f6e SSL \u4e0a\u4e0b\u6587\u7684\u9009\u9879\uff0c\u9996\u5148\u662f https.sessioncontext.shared \u63a7\u5236\u662f\u5426\u5168\u5c40\u5171\u4eab\u540c\u4e00\u4e2a SSLContext\uff0c\u5982\u679c\u8bbe\u4e3a true\uff0c\u5219\u5404\u7ebf\u7a0b\u5171\u4eab\u540c\u4e00\u4e2a SSL \u4e0a\u4e0b\u6587\uff0c\u8fd9\u6837\u5bf9\u65bd\u538b\u673a\u6027\u80fd\u538b\u529b\u6700\u4f4e\uff0c\u4f46\u4e0d\u80fd\u6a21\u62df\u771f\u5b9e\u591a\u7528\u6237 SSL \u63e1\u624b\u7684\u60c5\u51b5\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e8c\u4e2a\u5f00\u5173<code>httpclient.reset_state_on_thread_group_iteration<\/code>\u662f\u7ebf\u7a0b\u7ec4\u6bcf\u6b21\u5faa\u73af\u662f\u5426\u91cd\u7f6e SSL \u4e0a\u4e0b\u6587\uff0c5.0 \u4e4b\u540e\u9ed8\u8ba4\u4e3atrue\uff0c\u4e5f\u5c31\u662f\u8bf4\u6bcf\u6b21\u5faa\u73af\u90fd\u4f1a\u91cd\u7f6e SSL \u4e0a\u4e0b\u6587\uff0c\u770b\u6765\u8fd9\u5c31\u662f\u5bfc\u81f4 SSL \u9891\u7e41\u63e1\u624b\u7684\u539f\u56e0\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u95ee\u9898\u9a8c\u8bc1<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u56de\u5f52\u6d4b\u8bd5<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728 jmeter.properties \u4e2d\u5c06\u914d\u7f6e\u6bcf\u4e2a\u7ebf\u7a0b\u5faa\u73af\u65f6\uff0c\u4e0d\u91cd\u7f6e SSL \u4e0a\u4e0b\u6587\uff0c\u5728 PTS \u63a7\u5236\u53f0\u518d\u6b21\u542f\u52a8\u538b\u6d4b\uff0cRT \u76f4\u63a5\u4e0b\u964d 10 \u500d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>httpclient.reset_state_on_thread_group_iteration=false<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/xmt1139057136\/xttblog\/2022\/06\/jmeter4.png\" alt=\"\u4fee\u6539\u524d\u540e\u5bf9\u6bd4\" \/><figcaption>\u4fee\u6539\u524d\u540e\u5bf9\u6bd4<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u6e90\u7801\u9a8c\u8bc1<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u4ece\u6e90\u7801\u5c42\u9762\u5206\u6790\u4e0b JMeter \u662f\u600e\u4e48\u5b9e\u73b0\u5faa\u73af\u91cd\u7f6e SSL \u4e0a\u4e0b\u6587\u7684\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n *  Whether SSL State\/Context should be reset\n *  Shared state for any HC based implementation, because SSL contexts are the same \n *\/\nprotected static final ThreadLocal&lt;Boolean&gt; resetStateOnThreadGroupIteration =\n        ThreadLocal.withInitial(() -&gt; Boolean.FALSE);\n\n\n\/**\n * Reset SSL State. &lt;br\/&gt;\n * In order to do that we need to:\n * &lt;ul&gt;\n *  &lt;li&gt;Call resetContext() on SSLManager&lt;\/li&gt;\n *  &lt;li&gt;Close current Idle or Expired connections that hold SSL State&lt;\/li&gt;\n *  &lt;li&gt;Remove HttpClientContext.USER_TOKEN from {@link HttpClientContext}&lt;\/li&gt;\n * &lt;\/ul&gt;\n * @param jMeterVariables {@link JMeterVariables}\n * @param clientContext {@link HttpClientContext}\n * @param mapHttpClientPerHttpClientKey Map of {@link Pair} holding {@link CloseableHttpClient} and {@link PoolingHttpClientConnectionManager}\n *\/\nprivate void resetStateIfNeeded(JMeterVariables jMeterVariables, \n        HttpClientContext clientContext,\n        Map&lt;HttpClientKey, Pair&lt;CloseableHttpClient, PoolingHttpClientConnectionManager&gt;&gt; mapHttpClientPerHttpClientKey) {\n    if (resetStateOnThreadGroupIteration.get()) {\n        \/\/ \u5173\u95ed\u5f53\u524d\u7ebf\u7a0b\u5bf9\u5e94\u8fde\u63a5\u6c60\u7684\u8d85\u65f6\u3001\u7a7a\u95f2\u8fde\u63a5\uff0c\u91cd\u7f6e\u8fde\u63a5\u6c60\u72b6\u6001\n        closeCurrentConnections(mapHttpClientPerHttpClientKey);\n        \/\/ \u79fb\u9664Token\n        clientContext.removeAttribute(HttpClientContext.USER_TOKEN);\n        \/\/ \u91cd\u7f6eSSL\u4e0a\u4e0b\u6587\n        ((JsseSSLManager) SSLManager.getInstance()).resetContext();\n        \/\/ \u6807\u8bb0\u7f6e\u4e3afalse\uff0c\u4fdd\u8bc1\u4e00\u6b21\u5faa\u73af\u4e2d\uff0c\u53ea\u6709\u7b2c\u4e00\u4e2a\u91c7\u6837\u5668\u8d70\u8fdb\u6b64\u903b\u8f91\n        resetStateOnThreadGroupIteration.set(false);\n    }\n}\n\n@Override\nprotected void notifyFirstSampleAfterLoopRestart() {\n    log.debug(\"notifyFirstSampleAfterLoopRestart called \"\n            + \"with config(httpclient.reset_state_on_thread_group_iteration={})\",\n            RESET_STATE_ON_THREAD_GROUP_ITERATION);\n    resetStateOnThreadGroupIteration.set(RESET_STATE_ON_THREAD_GROUP_ITERATION);\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u6bcf\u6b21\u57fa\u4e8e Apache HTTPClient4 \u7684 HTTP \u91c7\u6837\u5668\u6267\u884c\u65f6\uff0c\u90fd\u4f1a\u8c03\u7528 resetStateIfNeeded \u65b9\u6cd5\uff0c\u5728\u8fdb\u5165\u65b9\u6cd5\u65f6\u8bfb\u53d6<code>httpclient.reset_state_on_thread_group_iteration<\/code>\u914d\u7f6e\uff0c\u5373 resetStateOnThreadGroupIteration\u3002\u5982\u679c\u662f true\uff0c\u91cd\u7f6e\u5f53\u524d\u7ebf\u7a0b\u7684\u8fde\u63a5\u6c60\u72b6\u6001\u3001\u91cd\u7f6e SSL \u4e0a\u4e0b\u6587\uff0c\u7136\u540e\u518d\u5c06 resetStateOnThreadGroupIteration \u7f6e\u4e3a false\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u56e0\u4e3a JMeter \u7684\u5e76\u53d1\u662f\u57fa\u4e8e\u7ebf\u7a0b\u5b9e\u73b0\u7684\uff0cresetStateOnThreadGroupIteration \u8fd9\u4e2a\u5f00\u5173\u653e\u5728 ThreadLocal \u91cc\uff0c\u5728\u6bcf\u6b21\u5faa\u73af\u5f00\u59cb\u65f6\uff0c\u4f1a\u8c03\u7528 notifyFirstSampleAfterLoopRestart \u65b9\u6cd5\uff0c\u91cd\u7f6e\u5f00\u5173\uff0c\u8fd0\u884c\u4e00\u6b21\u540e\uff0c\u5f3a\u5236\u628a\u5f00\u5173\u7f6e\u4e3a false\u3002\u8fd9\u4fdd\u8bc1\u4e86\u6bcf\u6b21\u5faa\u73af\u53ea\u6709\u7b2c\u4e00\u4e2a\u91c7\u6837\u5668\u8fdb\u5165\u6b64\u903b\u8f91\uff0c\u4e5f\u5c31\u662f\u6bcf\u6b21\u5faa\u73af\u53ea\u6267\u884c\u4e00\u6b21\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u603b\u7ed3<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u6b21\u89e3\u51b3\u4e86 JMeter5.0 \u7248\u672c\u4ee5\u4e0a\u538b\u6d4b HTTPS \u534f\u8bae\u7684\u6027\u80fd\u95ee\u9898\uff0c\u7ecf\u9a8c\u603b\u7ed3\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u5982\u679c\u5e0c\u671b\u65bd\u538b\u673a\u53d1\u6325\u6700\u5927\u6027\u80fd\uff0c\u53ef\u4ee5\u5c06<code>https.sessioncontext.shared<\/code>\u8bbe\u4e3a true\uff0c\u8fd9\u6837\u6240\u6709\u7ebf\u7a0b\u4f1a\u5171\u4eab\u540c\u4e00\u4e2a SSL \u4e0a\u4e0b\u6587\uff0c\u4e0d\u4f1a\u9891\u7e41\u63e1\u624b\uff0c\u4f46\u662f\u4e0d\u80fd\u6a21\u62df\u771f\u5b9e\u60c5\u51b5\u4e0b\u591a\u7528\u6237\u7684\u573a\u666f\u3002\n<\/li><li>\u5982\u679c\u5e0c\u671b\u6a21\u62df\u591a\u4e2a\u7528\u6237\uff0c\u4e0d\u505c\u5faa\u73af\u6267\u884c\u67d0\u4e00\u4e2a\u52a8\u4f5c\uff0c\u4e5f\u5c31\u662f\u4e00\u4e2a\u7ebf\u7a0b\u7ec4\u6bcf\u6b21\u5faa\u73af\u6a21\u62df\u540c\u4e00\u4e2a\u7528\u6237\u7684\u884c\u4e3a\uff0c\u53ef\u4ee5\u5c06<code>httpclient.reset_state_on_thread_group_iteration<\/code>\u8bbe\u7f6e\u4e3a false\uff0c\u8fd9\u6837\u4e5f\u53ef\u4ee5\u5f88\u5927\u7684\u63d0\u9ad8\u5355\u673a\u538b\u6d4b HTTPS \u7684\u6027\u80fd\u3002\n<\/li><li>\u5982\u679c\u5e0c\u671b\u6bcf\u4e2a\u7ebf\u7a0b\u7ec4\u6bcf\u6b21\u5faa\u73af\u6a21\u62df\u4e0d\u540c\u7528\u6237\uff0c\u90a3\u9700\u8981\u8bbe\u7f6e<code>httpclient.reset_state_on_thread_group_iteration=true<\/code>\uff0c\u6b64\u65f6\u538b\u6d4b\u4f1a\u6a21\u62df\u591a\u7528\u6237\u9891\u7e41 SSL \u63e1\u624b\uff0c\u65bd\u538b\u673a\u6027\u80fd\u6700\u4f4e\uff0c\u4ece\u7ecf\u9a8c\u6765\u770b\uff0c\u5355\u673a\u4e0a\u9650 50 \u5e76\u53d1\u5de6\u53f3\u3002\u8fd9\u4e5f\u662f JMeter5.0 \u7248\u672c\u4e4b\u540e\u7684\u9ed8\u8ba4\u8bbe\u7f6e\u3002\n<\/li><\/ol>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=5347\">\u8bb0\u4e00\u6b21JMeter\u538b\u6d4bHTTP\u548c HTTPS \u534f\u8baeRT\u5dee\u8ddd\u975e\u5e38\u5927\u7684\u6027\u80fd\u95ee\u9898<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u95ee\u9898\u80cc\u666f \u5728\u4f7f\u7528 JMeter \u538b\u6d4b\u65f6\uff0c\u53d1\u73b0\u540c\u4e00\u540e\u7aef\u670d\u52a1\uff0c\u5728\u5355\u673a 500 \u5e76\u53d1\u4e0b\uff0cHTTP \u548c HTTPS \u534f [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[386,169,1939,456,1623],"class_list":["post-5347","post","type-post","status-publish","format-standard","hentry","category-yyzt","tag-java","tag-jmeter","tag-1939","tag-456","tag-1623"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5347"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5347\/revisions"}],"predecessor-version":[{"id":5348,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5347\/revisions\/5348"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}