{"id":1118281,"date":"2025-01-08T18:33:59","date_gmt":"2025-01-08T10:33:59","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1118281.html"},"modified":"2025-01-08T18:34:01","modified_gmt":"2025-01-08T10:34:01","slug":"python%e5%a6%82%e4%bd%95%e6%b5%8b%e9%87%8f%e7%a8%8b%e5%ba%8f%e8%bf%90%e8%a1%8c%e6%97%b6%e9%97%b4","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1118281.html","title":{"rendered":"python\u5982\u4f55\u6d4b\u91cf\u7a0b\u5e8f\u8fd0\u884c\u65f6\u95f4"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25081836\/648dd879-98c5-42e3-a342-7d0574c4b0a3.webp\" alt=\"python\u5982\u4f55\u6d4b\u91cf\u7a0b\u5e8f\u8fd0\u884c\u65f6\u95f4\" \/><\/p>\n<p><p> <strong>Python\u5982\u4f55\u6d4b\u91cf\u7a0b\u5e8f\u8fd0\u884c\u65f6\u95f4<\/strong>\uff1a\u4f7f\u7528time\u6a21\u5757\u3001\u4f7f\u7528datetime\u6a21\u5757\u3001\u4f7f\u7528timeit\u6a21\u5757\u3001\u4f7f\u7528cProfile\u6a21\u5757\u3002<strong>\u5176\u4e2d\uff0c\u4f7f\u7528time\u6a21\u5757\u662f\u6700\u7b80\u5355\u548c\u5e38\u7528\u7684\u65b9\u6cd5<\/strong>\uff0c\u5b83\u53ef\u4ee5\u901a\u8fc7\u8bb0\u5f55\u7a0b\u5e8f\u5f00\u59cb\u548c\u7ed3\u675f\u7684\u65f6\u95f4\u6765\u8ba1\u7b97\u8fd0\u884c\u65f6\u95f4\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528time\u6a21\u5757<\/h3>\n<\/p>\n<p><p><code>time<\/code>\u6a21\u5757\u662fPython\u4e2d\u6700\u7b80\u5355\u548c\u5e38\u7528\u7684\u6d4b\u91cf\u7a0b\u5e8f\u8fd0\u884c\u65f6\u95f4\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u901a\u8fc7\u8bb0\u5f55\u7a0b\u5e8f\u5f00\u59cb\u548c\u7ed3\u675f\u7684\u65f6\u95f4\uff0c\u53ef\u4ee5\u8f7b\u677e\u8ba1\u7b97\u51fa\u7a0b\u5e8f\u7684\u8fd0\u884c\u65f6\u95f4\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><h4>1.1 \u8bb0\u5f55\u5f00\u59cb\u65f6\u95f4\u548c\u7ed3\u675f\u65f6\u95f4<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5bfc\u5165<code>time<\/code>\u6a21\u5757\uff0c\u7136\u540e\u5728\u7a0b\u5e8f\u5f00\u59cb\u548c\u7ed3\u675f\u7684\u4f4d\u7f6e\u5206\u522b\u8bb0\u5f55\u65f6\u95f4\u3002\u6700\u540e\uff0c\u901a\u8fc7\u8ba1\u7b97\u7ed3\u675f\u65f6\u95f4\u51cf\u53bb\u5f00\u59cb\u65f6\u95f4\u6765\u5f97\u5230\u7a0b\u5e8f\u8fd0\u884c\u7684\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import time<\/p>\n<p>start_time = time.time()<\/p>\n<h2><strong>\u4f60\u7684\u4ee3\u7801<\/strong><\/h2>\n<p>end_time = time.time()<\/p>\n<p>print(f&quot;\u7a0b\u5e8f\u8fd0\u884c\u65f6\u95f4: {end_time - start_time} \u79d2&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>1.2 \u793a\u4f8b<\/h4>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u6f14\u793a\u5982\u4f55\u4f7f\u7528<code>time<\/code>\u6a21\u5757\u6765\u6d4b\u91cf\u4e00\u4e2a\u7b80\u5355\u5faa\u73af\u7684\u8fd0\u884c\u65f6\u95f4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import time<\/p>\n<p>start_time = time.time()<\/p>\n<h2><strong>\u6a21\u62df\u4e00\u4e2a\u8017\u65f6\u7684\u4efb\u52a1<\/strong><\/h2>\n<p>for i in range(1000000):<\/p>\n<p>    pass<\/p>\n<p>end_time = time.time()<\/p>\n<p>print(f&quot;\u7a0b\u5e8f\u8fd0\u884c\u65f6\u95f4: {end_time - start_time} \u79d2&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u975e\u5e38\u65b9\u4fbf\u5730\u6d4b\u91cf\u7a0b\u5e8f\u7684\u8fd0\u884c\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528datetime\u6a21\u5757<\/h3>\n<\/p>\n<p><p><code>datetime<\/code>\u6a21\u5757\u4e5f\u53ef\u4ee5\u7528\u4e8e\u6d4b\u91cf\u7a0b\u5e8f\u7684\u8fd0\u884c\u65f6\u95f4\u3002\u4e0e<code>time<\/code>\u6a21\u5757\u7c7b\u4f3c\uff0c\u6211\u4eec\u53ef\u4ee5\u8bb0\u5f55\u5f00\u59cb\u548c\u7ed3\u675f\u7684\u65f6\u95f4\uff0c\u7136\u540e\u8ba1\u7b97\u4e24\u8005\u7684\u5dee\u503c\u3002<\/p>\n<\/p>\n<p><h4>2.1 \u8bb0\u5f55\u5f00\u59cb\u65f6\u95f4\u548c\u7ed3\u675f\u65f6\u95f4<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5bfc\u5165<code>datetime<\/code>\u6a21\u5757\uff0c\u7136\u540e\u5728\u7a0b\u5e8f\u5f00\u59cb\u548c\u7ed3\u675f\u7684\u4f4d\u7f6e\u5206\u522b\u8bb0\u5f55\u65f6\u95f4\u3002\u6700\u540e\uff0c\u901a\u8fc7\u8ba1\u7b97\u7ed3\u675f\u65f6\u95f4\u51cf\u53bb\u5f00\u59cb\u65f6\u95f4\u6765\u5f97\u5230\u7a0b\u5e8f\u8fd0\u884c\u7684\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from datetime import datetime<\/p>\n<p>start_time = datetime.now()<\/p>\n<h2><strong>\u4f60\u7684\u4ee3\u7801<\/strong><\/h2>\n<p>end_time = datetime.now()<\/p>\n<p>print(f&quot;\u7a0b\u5e8f\u8fd0\u884c\u65f6\u95f4: {end_time - start_time}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2.2 \u793a\u4f8b<\/h4>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u6f14\u793a\u5982\u4f55\u4f7f\u7528<code>datetime<\/code>\u6a21\u5757\u6765\u6d4b\u91cf\u4e00\u4e2a\u7b80\u5355\u5faa\u73af\u7684\u8fd0\u884c\u65f6\u95f4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from datetime import datetime<\/p>\n<p>start_time = datetime.now()<\/p>\n<h2><strong>\u6a21\u62df\u4e00\u4e2a\u8017\u65f6\u7684\u4efb\u52a1<\/strong><\/h2>\n<p>for i in range(1000000):<\/p>\n<p>    pass<\/p>\n<p>end_time = datetime.now()<\/p>\n<p>print(f&quot;\u7a0b\u5e8f\u8fd0\u884c\u65f6\u95f4: {end_time - start_time}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528<code>datetime<\/code>\u6a21\u5757\u53ef\u4ee5\u66f4\u65b9\u4fbf\u5730\u683c\u5f0f\u5316\u548c\u5904\u7406\u65f6\u95f4\u5dee\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528timeit\u6a21\u5757<\/h3>\n<\/p>\n<p><p><code>timeit<\/code>\u6a21\u5757\u662fPython\u4e2d\u4e13\u95e8\u7528\u4e8e\u6d4b\u91cf\u5c0f\u6bb5\u4ee3\u7801\u8fd0\u884c\u65f6\u95f4\u7684\u6a21\u5757\u3002\u5b83\u53ef\u4ee5\u81ea\u52a8\u8fdb\u884c\u591a\u6b21\u8fd0\u884c\u4ee5\u5f97\u5230\u5e73\u5747\u503c\uff0c\u4ece\u800c\u63d0\u4f9b\u66f4\u7cbe\u786e\u7684\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><h4>3.1 \u4f7f\u7528timeit.timeit\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p><code>timeit.timeit<\/code>\u65b9\u6cd5\u53ef\u4ee5\u76f4\u63a5\u6d4b\u91cf\u4e00\u6bb5\u4ee3\u7801\u7684\u8fd0\u884c\u65f6\u95f4\u3002\u5b83\u9700\u8981\u4f20\u5165\u5f85\u6d4b\u4ee3\u7801\u5b57\u7b26\u4e32\u548c\u9700\u8981\u8fd0\u884c\u7684\u6b21\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import timeit<\/p>\n<p>code_to_test = &quot;&quot;&quot;<\/p>\n<p>a = 0<\/p>\n<p>for i in range(1000000):<\/p>\n<p>    a += i<\/p>\n<p>&quot;&quot;&quot;<\/p>\n<p>execution_time = timeit.timeit(code_to_test, number=100)<\/p>\n<p>print(f&quot;\u4ee3\u7801\u8fd0\u884c\u65f6\u95f4: {execution_time} \u79d2&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3.2 \u4f7f\u7528timeit.Timer\u7c7b<\/h4>\n<\/p>\n<p><p><code>timeit.Timer<\/code>\u7c7b\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u8ba1\u65f6\u5668\u5bf9\u8c61\uff0c\u7136\u540e\u8c03\u7528\u5176<code>timeit<\/code>\u65b9\u6cd5\u6765\u6d4b\u91cf\u4ee3\u7801\u7684\u8fd0\u884c\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import timeit<\/p>\n<p>def test_code():<\/p>\n<p>    a = 0<\/p>\n<p>    for i in range(1000000):<\/p>\n<p>        a += i<\/p>\n<p>timer = timeit.Timer(test_code)<\/p>\n<p>execution_time = timer.timeit(number=100)<\/p>\n<p>print(f&quot;\u4ee3\u7801\u8fd0\u884c\u65f6\u95f4: {execution_time} \u79d2&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528cProfile\u6a21\u5757<\/h3>\n<\/p>\n<p><p><code>cProfile<\/code>\u6a21\u5757\u662fPython\u5185\u7f6e\u7684\u6027\u80fd\u5206\u6790\u5de5\u5177\uff0c\u53ef\u4ee5\u8be6\u7ec6\u5206\u6790\u7a0b\u5e8f\u7684\u6027\u80fd\uff0c\u5305\u62ec\u51fd\u6570\u7684\u8c03\u7528\u6b21\u6570\u548c\u8fd0\u884c\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><h4>4.1 \u57fa\u672c\u4f7f\u7528<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528<code>cProfile<\/code>\u6a21\u5757\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5bfc\u5165\u5e76\u8fd0\u884c\u5373\u53ef\u3002<code>cProfile.run<\/code>\u65b9\u6cd5\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884c\u6307\u5b9a\u7684\u4ee3\u7801\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import cProfile<\/p>\n<p>def test_code():<\/p>\n<p>    a = 0<\/p>\n<p>    for i in range(1000000):<\/p>\n<p>        a += i<\/p>\n<p>cProfile.run(&#39;test_code()&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4.2 \u8f93\u51fa\u89e3\u91ca<\/h4>\n<\/p>\n<p><p><code>cProfile<\/code>\u6a21\u5757\u7684\u8f93\u51fa\u5305\u62ec\u4ee5\u4e0b\u51e0\u90e8\u5206\uff1a<\/p>\n<\/p>\n<ul>\n<li><code>ncalls<\/code>: \u51fd\u6570\u88ab\u8c03\u7528\u7684\u6b21\u6570<\/li>\n<li><code>tottime<\/code>: \u51fd\u6570\u8fd0\u884c\u7684\u603b\u65f6\u95f4\uff0c\u4e0d\u5305\u62ec\u8c03\u7528\u5176\u4ed6\u51fd\u6570\u7684\u65f6\u95f4<\/li>\n<li><code>percall<\/code>: \u5e73\u5747\u6bcf\u6b21\u8c03\u7528\u7684\u65f6\u95f4\uff0c\u7b49\u4e8e<code>tottime\/ncalls<\/code><\/li>\n<li><code>cumtime<\/code>: \u51fd\u6570\u8fd0\u884c\u7684\u7d2f\u8ba1\u65f6\u95f4\uff0c\u5305\u62ec\u8c03\u7528\u5176\u4ed6\u51fd\u6570\u7684\u65f6\u95f4<\/li>\n<li><code>percall<\/code>: \u5e73\u5747\u6bcf\u6b21\u8c03\u7528\u7684\u65f6\u95f4\uff0c\u7b49\u4e8e<code>cumtime\/ncalls<\/code><\/li>\n<li><code>filename:lineno(function)<\/code>: \u51fd\u6570\u5b9a\u4e49\u7684\u4f4d\u7f6e<\/li>\n<\/ul>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u6d4b\u91cf\u7a0b\u5e8f\u8fd0\u884c\u65f6\u95f4\u662f\u4f18\u5316\u548c\u8c03\u8bd5\u4ee3\u7801\u7684\u91cd\u8981\u6b65\u9aa4\u3002Python\u63d0\u4f9b\u4e86\u591a\u79cd\u6d4b\u91cf\u7a0b\u5e8f\u8fd0\u884c\u65f6\u95f4\u7684\u65b9\u6cd5\uff0c\u5305\u62ec<code>time<\/code>\u6a21\u5757\u3001<code>datetime<\/code>\u6a21\u5757\u3001<code>timeit<\/code>\u6a21\u5757\u548c<code>cProfile<\/code>\u6a21\u5757\u3002<strong>\u5176\u4e2d\uff0c\u4f7f\u7528time\u6a21\u5757\u662f\u6700\u7b80\u5355\u548c\u5e38\u7528\u7684\u65b9\u6cd5<\/strong>\u3002\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u5730\u5206\u6790\u548c\u4f18\u5316\u7a0b\u5e8f\u6027\u80fd\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u5185\u7f6e\u6a21\u5757\u6765\u6d4b\u91cf\u7a0b\u5e8f\u7684\u8fd0\u884c\u65f6\u95f4\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>time<\/code>\u6a21\u5757\u6765\u6d4b\u91cf\u7a0b\u5e8f\u7684\u8fd0\u884c\u65f6\u95f4\u3002\u901a\u8fc7\u8bb0\u5f55\u7a0b\u5e8f\u5f00\u59cb\u548c\u7ed3\u675f\u65f6\u7684\u65f6\u95f4\u6233\uff0c\u53ef\u4ee5\u8f7b\u677e\u8ba1\u7b97\u51fa\u8fd0\u884c\u65f6\u957f\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a  <\/p>\n<pre><code class=\"language-python\">import time\n\nstart_time = time.time()  # \u8bb0\u5f55\u5f00\u59cb\u65f6\u95f4\n\n# \u8fd9\u91cc\u653e\u7f6e\u4f60\u7684\u7a0b\u5e8f\u4ee3\u7801\n\nend_time = time.time()  # \u8bb0\u5f55\u7ed3\u675f\u65f6\u95f4\nprint(f&quot;\u7a0b\u5e8f\u8fd0\u884c\u65f6\u95f4\uff1a{end_time - start_time}\u79d2&quot;)\n<\/code><\/pre>\n<p><strong>\u6709\u6ca1\u6709\u5176\u4ed6\u65b9\u6cd5\u53ef\u4ee5\u6d4b\u91cfPython\u7a0b\u5e8f\u7684\u6027\u80fd\uff1f<\/strong><br \/>\u9664\u4e86<code>time<\/code>\u6a21\u5757\u5916\uff0c<code>timeit<\/code>\u6a21\u5757\u4e5f\u662f\u4e00\u4e2a\u975e\u5e38\u6709\u6548\u7684\u5de5\u5177\uff0c\u5b83\u4e13\u95e8\u7528\u4e8e\u6d4b\u91cf\u5c0f\u6bb5\u4ee3\u7801\u7684\u6267\u884c\u65f6\u95f4\u3002\u5b83\u53ef\u4ee5\u81ea\u52a8\u8fdb\u884c\u591a\u6b21\u8fd0\u884c\u4ee5\u5f97\u5230\u66f4\u51c6\u786e\u7684\u5e73\u5747\u503c\u3002\u4f7f\u7528\u65b9\u5f0f\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import timeit\n\nexecution_time = timeit.timeit(&#39;your_code_here&#39;, number=100)\nprint(f&quot;\u4ee3\u7801\u6267\u884c\u65f6\u95f4\uff1a{execution_time}\u79d2&quot;)\n<\/code><\/pre>\n<p>\u5728\u8fd9\u91cc\uff0c<code>number<\/code>\u53c2\u6570\u53ef\u4ee5\u8bbe\u7f6e\u4ee3\u7801\u6267\u884c\u7684\u6b21\u6570\uff0c\u4ee5\u4fbf\u83b7\u5f97\u66f4\u7a33\u5b9a\u7684\u7ed3\u679c\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u6d4b\u91cf\u7279\u5b9a\u51fd\u6570\u7684\u6267\u884c\u65f6\u95f4\uff1f<\/strong><br \/>\u5982\u679c\u60a8\u5e0c\u671b\u6d4b\u91cf\u7279\u5b9a\u51fd\u6570\u7684\u6267\u884c\u65f6\u95f4\uff0c\u53ef\u4ee5\u4f7f\u7528\u88c5\u9970\u5668\u6765\u5b9e\u73b0\u8fd9\u4e00\u529f\u80fd\u3002\u901a\u8fc7\u521b\u5efa\u4e00\u4e2a\u88c5\u9970\u5668\uff0c\u53ef\u4ee5\u5728\u8c03\u7528\u51fd\u6570\u524d\u540e\u8bb0\u5f55\u65f6\u95f4\uff0c\u4ece\u800c\u5f97\u5230\u8be5\u51fd\u6570\u7684\u8fd0\u884c\u65f6\u957f\u3002\u793a\u4f8b\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import time\n\ndef time_it(func):\n    def wrapper(*args, **kwargs):\n        start_time = time.time()\n        result = func(*args, **kwargs)\n        end_time = time.time()\n        print(f&quot;{func.__name__} \u6267\u884c\u65f6\u95f4\uff1a{end_time - start_time}\u79d2&quot;)\n        return result\n    return wrapper\n\n@time_it\ndef example_function():\n    # \u6a21\u62df\u4e00\u4e9b\u8017\u65f6\u64cd\u4f5c\n    time.sleep(2)\n\nexample_function()\n<\/code><\/pre>\n<p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<code>example_function<\/code>\u7684\u6267\u884c\u65f6\u95f4\u4f1a\u88ab\u81ea\u52a8\u8ba1\u7b97\u5e76\u8f93\u51fa\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5982\u4f55\u6d4b\u91cf\u7a0b\u5e8f\u8fd0\u884c\u65f6\u95f4\uff1a\u4f7f\u7528time\u6a21\u5757\u3001\u4f7f\u7528datetime\u6a21\u5757\u3001\u4f7f\u7528timeit\u6a21\u5757\u3001\u4f7f\u7528cPr [&hellip;]","protected":false},"author":3,"featured_media":1118289,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1118281"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1118281"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1118281\/revisions"}],"predecessor-version":[{"id":1118291,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1118281\/revisions\/1118291"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1118289"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1118281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1118281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1118281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}