| <!doctype html> |
| <!-- |
| Minimal Mistakes Jekyll Theme 4.4.1 by Michael Rose |
| Copyright 2017 Michael Rose - mademistakes.com | @mmistakes |
| Free for personal and commercial use under the MIT license |
| https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt |
| --> |
| <html lang="cn" class="no-js"> |
| <head> |
| <meta charset="utf-8"> |
| |
| <!-- begin SEO --> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <title>使用JMeter对秒杀示例进行性能测试 - Apache ServiceComb</title> |
| |
| |
| |
| |
| <meta name="description" content="介绍如何使用JMeter进行性能测试以及获取秒杀示例的性能基线"> |
| |
| |
| |
| |
| <meta name="author" content="Yangyong Zheng"> |
| |
| <meta property="og:locale" content="cn"> |
| <meta property="og:site_name" content="Apache ServiceComb"> |
| <meta property="og:title" content="使用JMeter对秒杀示例进行性能测试"> |
| |
| |
| <link rel="canonical" href="https://github.com/pages/apache/incubator-servicecomb-website/cn/docs/performance-test-on-seckill-with-jmeter/"> |
| <meta property="og:url" content="https://github.com/pages/apache/incubator-servicecomb-website/cn/docs/performance-test-on-seckill-with-jmeter/"> |
| |
| |
| |
| <meta property="og:description" content="介绍如何使用JMeter进行性能测试以及获取秒杀示例的性能基线"> |
| |
| |
| |
| <meta name="twitter:site" content="@ServiceComb"> |
| <meta name="twitter:title" content="使用JMeter对秒杀示例进行性能测试"> |
| <meta name="twitter:description" content="介绍如何使用JMeter进行性能测试以及获取秒杀示例的性能基线"> |
| <meta name="twitter:url" content=""> |
| |
| |
| <meta name="twitter:card" content="summary"> |
| |
| |
| |
| |
| <meta name="twitter:creator" content="@"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <meta property="og:type" content="article"> |
| <meta property="article:published_time" content="2017-09-15T00:00:00+08:00"> |
| |
| |
| |
| |
| |
| |
| |
| |
| <script type="application/ld+json"> |
| { |
| "@context" : "http://schema.org", |
| "@type" : "Person", |
| "name" : "Apache ServiceComb", |
| "url" : "https://github.com/pages/apache/incubator-servicecomb-website", |
| "sameAs" : null |
| } |
| </script> |
| |
| |
| |
| <meta name="google-site-verification" content="HvJjNd7vvJ-yjSTHlBiIWEYxp_Hrz-PYEY5Idz9LRcA" /> |
| |
| |
| |
| |
| <!-- end SEO --> |
| |
| |
| <link href="/feed.xml" type="application/atom+xml" rel="alternate" title="Apache ServiceComb Feed"> |
| |
| <!-- http://t.co/dKP3o1e --> |
| <meta name="HandheldFriendly" content="True"> |
| <meta name="MobileOptimized" content="320"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| |
| <script> |
| document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js '; |
| </script> |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js"></script> |
| <script src="/assets/vendor/prism/prism.js"></script> |
| |
| <script type="text/javascript" async |
| src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"> |
| </script> |
| |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> |
| |
| <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> |
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> |
| <!-- For all browsers --> |
| <link rel="stylesheet" href="/assets/css/main.css?v=1"> |
| <link rel="stylesheet" href="/assets/vendor/prism/prism.css?v=1"> |
| |
| <!--[if lte IE 9]> |
| <style> |
| /* old IE unsupported flexbox fixes */ |
| .greedy-nav .site-title { |
| padding-right: 3em; |
| } |
| .greedy-nav button { |
| position: absolute; |
| top: 0; |
| right: 0; |
| height: 100%; |
| } |
| </style> |
| <![endif]--> |
| |
| <meta http-equiv="cleartype" content="on"> |
| |
| <!-- start custom head snippets --> |
| |
| <!-- insert favicons. use http://realfavicongenerator.net/ --> |
| <link href="https://fonts.cat.net/css?family=Roboto:400,500,700|Source+Code+Pro" rel="stylesheet"> |
| <script src="/assets/js/custom.js"></script> |
| <!-- end custom head snippets --> |
| |
| </head> |
| |
| <body class="layout--single"> |
| |
| <!--[if lt IE 9]> |
| <div class="notice--danger align-center" style="margin: 0;">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</div> |
| <![endif]--> |
| <div class="masthead" onmouseleave="$('#childrenShow').css('display', 'none')"> |
| <div class="masthead__inner-wrap"> |
| <div class="masthead__menu"> |
| <nav id="site-nav" class="greedy-nav"> |
| |
| <a class="site-title active" href="/cn"><img src="https://www.apache.org/img/servicecomb.png"></a> |
| |
| <ul class="visible-links"> |
| |
| |
| |
| |
| |
| <li class="masthead__menu-item" onmouseenter="$('#childrenShow').css('display', 'none')"> |
| |
| <a href="/cn/">首页</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| <li class="masthead__menu-item" onmouseenter="$('#childrenShow').css('display', 'none')"> |
| |
| <a href="/cn/developers/">项目</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| <li class="def-nav-li" onmouseenter="$('#childrenShow').css('display', 'block')"> |
| |
| |
| |
| |
| |
| <a href="/cn/docs/users/">文档</a> |
| |
| |
| <ul id="childrenShow" class="def-children-show-cn" onmouseleave="$('#childrenShow').css('display', 'none')"> |
| |
| <li><a href="/cn/docs/getting-started/" class="">入门指南</a></li> |
| |
| <li><a href="/cn/docs/users/" class="">用户手册</a></li> |
| |
| <li><a href="/cn/slides/" class="">大咖视频</a></li> |
| |
| <li><a href="/cn/faqs/" class="">常见问题</a></li> |
| |
| </ul> |
| </li> |
| |
| |
| |
| |
| |
| |
| <li class="masthead__menu-item" onmouseenter="$('#childrenShow').css('display', 'none')"> |
| |
| <a href="/cn/developers/contributing">社区</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| <li class="masthead__menu-item" onmouseenter="$('#childrenShow').css('display', 'none')"> |
| |
| <a href="/cn/year-archive/">博文</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| |
| <li class="masthead__menu-item" onmouseenter="$('#childrenShow').css('display', 'none')"> |
| |
| <a href="/cn/release/">下载</a> |
| |
| </li> |
| |
| |
| </ul> |
| <button><div class="navicon"></div></button> |
| <ul class="hidden-links hidden"></ul> |
| <div class="nav-lang"> |
| |
| |
| |
| <a href=/docs/performance-test-on-seckill-with-jmeter/>English</a> |
| |
| </div> |
| </nav> |
| </div> |
| </div> |
| </div> |
| |
| |
| |
| |
| |
| |
| <div id="main" role="main"> |
| |
| <div class="sidebar sticky"> |
| |
| <div class="back-to-home"><a href="/cn/">首页</a> > 使用JMeter对秒杀示例进行性能测试</div> |
| |
| |
| |
| <div itemscope itemtype="http://schema.org/Person"> |
| |
| |
| |
| <div class="author__content"> |
| <h3 class="author__name" itemprop="name">Yangyong Zheng</h3> |
| |
| <p class="author__bio" itemprop="description"> |
| |
| |
| Fast Action, do not ask |
| |
| |
| </p> |
| |
| </div> |
| |
| <div class="author__urls-wrapper"> |
| <button class="btn btn--inverse">关注</button> |
| <ul class="author__urls social-icons"> |
| |
| |
| |
| <li> |
| <a href="https://zhengyangyong.github.io" itemprop="url"> |
| <i class="fa fa-fw fa-chain" aria-hidden="true"></i> 网站 |
| </a> |
| </li> |
| |
| |
| |
| <li> |
| <a href="mailto:yangyong.zheng@huawei.com"> |
| <meta itemprop="email" content="yangyong.zheng@huawei.com" /> |
| <i class="fa fa-fw fa-envelope-square" aria-hidden="true"></i> 电子邮箱 |
| </a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <!-- |
| <li> |
| <a href="http://link-to-whatever-social-network.com/user/" itemprop="sameAs"> |
| <i class="fa fa-fw" aria-hidden="true"></i> Custom Social Profile Link |
| </a> |
| </li> |
| --> |
| </ul> |
| </div> |
| </div> |
| |
| |
| </div> |
| |
| |
| |
| <article class="page" itemscope itemtype="http://schema.org/CreativeWork"> |
| <meta itemprop="headline" content="使用JMeter对秒杀示例进行性能测试"> |
| <meta itemprop="description" content="介绍如何使用JMeter进行性能测试以及获取秒杀示例的性能基线"> |
| <meta itemprop="datePublished" content="September 15, 2017"> |
| <meta itemprop="dateModified" content="September 15, 2017"> |
| |
| <div class="page__inner-wrap"> |
| |
| |
| <header> |
| <h1 class="page__title" itemprop="headline">使用JMeter对秒杀示例进行性能测试 |
| </h1> |
| |
| <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> |
| |
| |
| |
| |
| 少于 1 分钟 阅读 |
| |
| </p> |
| |
| </header> |
| |
| |
| |
| <section class="page__content" itemprop="text"> |
| <h2 id="背景">背景</h2> |
| <p> <a href="https://github.com/ServiceComb/seckill">秒杀</a>是我们ServiceComb开源团队以领域驱动设计(<a href="https://en.wikipedia.org/wiki/Domain-driven_design">DDD</a>)为背景,从零开始构建一个微服务架构的示例项目;在《秒杀开发历程》系列博文中提到它作为一个高并发压力场景的应用,采用了<a href="https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs">CQRS</a>模式构建,因此我们将使用<a href="http://jmeter.apache.org/">JMeter</a>来对其进行性能评估。</p> |
| |
| <h2 id="制定用户行为模型">制定用户行为模型</h2> |
| <p> 因为秒杀的场景在现实生活中非常常见,所以用户行为模型非常容易设计:</p> |
| <ol> |
| <li>客户不停的刷秒杀活动,直到刷出一个正在进行的秒杀活动;</li> |
| <li>刷出了秒杀活动后,马上请求秒杀优惠券;</li> |
| <li>无论是否成功,客户会稍后查询一次自己已经拥有的优惠券确定优惠券是否进入自己的账号。</li> |
| </ol> |
| |
| <p> 我们还需要一个管理员用户,隔一段时间就创建发布秒杀活动,当然活动包含的优惠券数量将会远少于客户的数量。 |
| |
| 用户行为模型在JMeter中体现为脚本逻辑,完成的脚本逻辑如下:</p> |
| |
| <p><img src="/assets/images/performance-test-on-seckill-with-jmeter-script.png" alt="图1 脚本模型" class="align-center" /></p> |
| |
| <p> 脚本文件已经托管至秒杀项目中,可直接获取:</p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git clone https://github.com/ServiceComb/seckill |
| <span class="nb">cd </span>seckill/performance-test/script |
| </code></pre></div></div> |
| |
| <h2 id="性能测试环境">性能测试环境</h2> |
| <p> 我们调来了两台云服务器进行性能测试,角色和配置如下:</p> |
| <h3 id="秒杀服务器配置">秒杀服务器配置</h3> |
| <p> 承载秒杀示例所有的微服务和中间件,包括四个微服务(Admin、Command、Event和Query)、两个数据库(ReadDB和WriteDB)和一个Message Broker(ActiveMQ)。</p> |
| |
| <table> |
| <thead> |
| <tr> |
| <th>配置项</th> |
| <th>配置值</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td>CPU</td> |
| <td>Intel Xeon E5-2690 3.0GHz * 16</td> |
| </tr> |
| <tr> |
| <td>MEM</td> |
| <td>64GB</td> |
| </tr> |
| <tr> |
| <td>OS</td> |
| <td>Ubuntu 16.04.2 LTS</td> |
| </tr> |
| </tbody> |
| </table> |
| |
| <p> 为了能够便于配置和启动示例系统,我们采用《秒杀开发历程(三)》中的一键启动模式拉起所有的服务,因此Docker升级为当前最新版17.06.2-ce,能够支持配置Container使用CPU和内存的大小限制,以Admin微服务为例: |
| </p> |
| <div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="na">admin-service</span><span class="pi">:</span> |
| <span class="na">mem_limit</span><span class="pi">:</span> <span class="s">4096m</span> |
| <span class="na">cpu_count</span><span class="pi">:</span> <span class="m">4</span> |
| <span class="na">cpu_percent</span><span class="pi">:</span> <span class="m">50</span> |
| <span class="na">image</span><span class="pi">:</span> <span class="s2">"</span><span class="s">seckill-admin-service:0.2.0-SNAPSHOT"</span> |
| <span class="na">hostname</span><span class="pi">:</span> <span class="s">admin-service</span> |
| <span class="na">links</span><span class="pi">:</span> |
| <span class="pi">-</span> <span class="s2">"</span><span class="s">mysql-write-db:write_db.servicecomb.io"</span> |
| <span class="na">environment</span><span class="pi">:</span> |
| <span class="pi">-</span> <span class="s">JAVA_OPTS=-Dspring.profiles.active=prd -Dendpoints.shutdown.enabled=true</span> |
| <span class="na">ports</span><span class="pi">:</span> |
| <span class="pi">-</span> <span class="s2">"</span><span class="s">8081:8081"</span> |
| </code></pre></div></div> |
| |
| <h3 id="加压机配置">加压机配置</h3> |
| <p> 加压机与秒杀服务器处于同一网络环境中,配置如下: |
| |
| | 配置项 | 配置值 | |
| | —- | —————————— | |
| | CPU | Intel Xeon E5-2690 3.0GHz * 16 | |
| | MEM | 32GB | |
| | OS | Ubuntu 16.04.2 LTS |</p> |
| |
| <h2 id="启动测试">启动测试</h2> |
| <p> 我们设定测试场景为200客户,每隔1秒启动一个新客户;1个管理员每隔10秒发布1个秒杀活动,一共发布160次,每个秒杀活动包含50张优惠券,即一共投放8000张优惠券。整个测试持续半个小时。 |
| |
| 现在,我们切换到性能测试脚本目录下,执行下面的命令启动测试: |
| </p> |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jmeter <span class="nt">-n</span> <span class="nt">-t</span> seckill.jmx <span class="nt">-l</span> log.jtl |
| </code></pre></div></div> |
| |
| <h2 id="测试结果">测试结果</h2> |
| <p> 测试完毕后通过下面的命令分析测试结果日志数据,请将<report folder="">替换为你的本地目录:</report></p> |
| |
| <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jmeter <span class="nt">-g</span> log.jtl <span class="nt">-o</span> <report folder> |
| </code></pre></div></div> |
| |
| <p> 我们需要先验证测试结果的正确性,查看数据统计图:</p> |
| |
| <p><img src="/assets/images/performance-test-on-seckill-with-jmeter-statistics.png" alt="图2 事务统计" class="align-center" /></p> |
| |
| <p> 其中秒杀的失败率在96.45%,原因是Query对于活动的秒杀活动采用的是0.5秒刷新缓存的策略,在活动中的优惠券被秒杀一空下架前,短暂的时间内仍然能够查询到这个活动;架构中采用的<a href="https://docs.microsoft.com/en-us/azure/architecture/patterns/cqrs">CQRS</a>模式只能保证最终一致性,并不能保证实时一致性。 |
| |
| 成功秒杀的次数为225264 - 217264 = 8000,正好等于我们设定的优惠券投放量,其他事务的失败率均为0%,因此测试结果正确。</p> |
| |
| <h3 id="吞吐能力">吞吐能力</h3> |
| <p> 秒杀整体吞吐能力如下图:</p> |
| |
| <p><img src="/assets/images/performance-test-on-seckill-with-jmeter-tps-all.png" alt="图3 整体吞吐能力" class="align-center" /></p> |
| |
| <p> 可以看到查询活跃的秒杀活动(刷券)事务处理量最高,稳定在4000左右,其他因为业务比例的原因较低,去掉查询活跃的秒杀活动事务后如下图:</p> |
| |
| <p><img src="/assets/images/performance-test-on-seckill-with-jmeter-tps-less.png" alt="图4 秒杀和优惠券查询" class="align-center" /></p> |
| |
| <p> 秒杀和优惠券查询之间的差值是由于存在秒杀失败造成的,我们的用户行为模型是无论秒杀成功与否都会进行一次优惠券查询。</p> |
| |
| <h3 id="响应时间">响应时间</h3> |
| <p> 事务的响应时间我们可以看下面两个图:</p> |
| |
| <p><img src="/assets/images/performance-test-on-seckill-with-jmeter-latencies.png" alt="图5 响应时间" class="align-center" /></p> |
| |
| <p><img src="/assets/images/performance-test-on-seckill-with-jmeter-time-percentiles.png" alt="图6 响应时间分布" class="align-center" /></p> |
| |
| <p> 75%的事务处理时间都在10ms以下,整体平均响应时间处于50ms以下。</p> |
| |
| <h2 id="瓶颈分析">瓶颈分析</h2> |
| <p> 依据执行过程中对于测试资源的观察,加压机CPU使用率基本已满(200线程并发),服务器CPU使用率低于20%,其他资源使用率很低。</p> |
| |
| <h2 id="总结">总结</h2> |
| <p> 通过这次性能测试,我们得知秒杀示例在使用一台普通服务器配置能够达到总体5000以上的TPS还能够保持较低的资源使用率,表现出良好的性能;未来我们会将秒杀示例部署在K8S群集中并配置弹性伸缩进行压力测试,您可以阅读我们<a href="http://servicecomb.io/cn/docs/stress-test-on-company-with-jmeter-in-k8s/">《在Kubernetes集群中使用JMeter对Company示例进行压力测试》</a>这篇文章展望。</p> |
| |
| |
| </section> |
| |
| <footer class="page__meta"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <p class="page__taxonomy"> |
| <strong><i class="fa fa-fw fa-tags" aria-hidden="true"></i> 标签: </strong> |
| <span itemprop="keywords"> |
| |
| |
| |
| <a href="/tags/#seckill" class="page__taxonomy-item" rel="tag">seckill</a><span class="sep">, </span> |
| |
| |
| |
| <a href="/tags/#%E5%8E%8B%E5%8A%9B%E6%B5%8B%E8%AF%95" class="page__taxonomy-item" rel="tag">压力测试</a> |
| |
| </span> |
| </p> |
| |
| |
| |
| |
| |
| |
| |
| |
| <p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> 最新的:</strong> <time datetime="2017-09-15">2017年9月15日</time></p> |
| |
| |
| |
| </footer> |
| |
| <section class="page__share"> |
| |
| <h4 class="page__share-title">分享</h4> |
| |
| |
| <a href="https://twitter.com/intent/tweet?via=ServiceComb&text=使用JMeter对秒杀示例进行性能测试 /cn/docs/performance-test-on-seckill-with-jmeter/" class="btn btn--twitter" title="分享 Twitter"><i class="fa fa-fw fa-twitter" aria-hidden="true"></i><span> Twitter</span></a> |
| |
| <a href="https://www.facebook.com/sharer/sharer.php?u=/cn/docs/performance-test-on-seckill-with-jmeter/" class="btn btn--facebook" title="分享 Facebook"><i class="fa fa-fw fa-facebook" aria-hidden="true"></i><span> Facebook</span></a> |
| |
| <a href="https://plus.google.com/share?url=/cn/docs/performance-test-on-seckill-with-jmeter/" class="btn btn--google-plus" title="分享 Google Plus"><i class="fa fa-fw fa-google-plus" aria-hidden="true"></i><span> Google+</span></a> |
| |
| <a href="https://www.linkedin.com/shareArticle?mini=true&url=/cn/docs/performance-test-on-seckill-with-jmeter/" class="btn btn--linkedin" title="分享 LinkedIn"><i class="fa fa-fw fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a> |
| </section> |
| |
| |
| |
| <nav class="pagination"> |
| |
| <a href="/cn/docs/maven_dependency_management/" class="pagination--pager" title="使用maven管理复杂依赖关系的技巧 |
| ">向前</a> |
| |
| |
| <a href="/docs/distributed_saga_2/" class="pagination--pager" title="Eventual Data Consistency Solution in ServiceComb - part 2 |
| ">向后</a> |
| |
| </nav> |
| |
| |
| </div> |
| |
| |
| <div class="page__comments"> |
| |
| |
| <section id="static-comments"> |
| |
| <!-- Start static comments --> |
| <div class="js-comments"> |
| |
| </div> |
| <!-- End static comments --> |
| |
| <!-- Start new comment form --> |
| <h4 class="page__comments-title">留下评论</h4> |
| <p class="small">您的电子邮箱地址并不会被展示。请填写标记为必须的字段。 <span class="required">*</span></p> |
| <form id="new_comment" class="page__comments-form js-form form" method="post" action="https://api.staticman.net/v1/entry/apache/incubator-servicecomb-website/master"> |
| <div class="form__spinner"> |
| <i class="fa fa-spinner fa-spin fa-3x fa-fw"></i> |
| <span class="sr-only">正在加载...</span> |
| </div> |
| |
| <fieldset> |
| <label for="comment-form-message">评论 <small class="required">*</small></label> |
| <textarea type="text" rows="3" id="comment-form-message" name="fields[message]" tabindex="1"></textarea> |
| <div class="small help-block"><a href="https://daringfireball.net/projects/markdown/">Markdown语法已支持。</a></div> |
| </fieldset> |
| <fieldset> |
| <label for="comment-form-name">姓名 <small class="required">*</small></label> |
| <input type="text" id="comment-form-name" name="fields[name]" tabindex="2" /> |
| </fieldset> |
| <fieldset> |
| <label for="comment-form-email">电子邮箱 <small class="required">*</small></label> |
| <input type="email" id="comment-form-email" name="fields[email]" tabindex="3" /> |
| </fieldset> |
| <fieldset> |
| <label for="comment-form-url">网站(可选)</label> |
| <input type="url" id="comment-form-url" name="fields[url]" tabindex="4"/> |
| </fieldset> |
| <fieldset class="hidden" style="display: none;"> |
| <input type="hidden" name="options[slug]" value="performance-test-on-seckill-with-jmeter"> |
| <label for="comment-form-location">Not used. Leave blank if you are a human.</label> |
| <input type="text" id="comment-form-location" name="fields[hidden]" autocomplete="off"/> |
| </fieldset> |
| <!-- Start comment form alert messaging --> |
| <p class="hidden js-notice"> |
| <strong class="js-notice-text"></strong> |
| </p> |
| <!-- End comment form alert messaging --> |
| <fieldset> |
| <button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--large">提交评论</button> |
| </fieldset> |
| </form> |
| <!-- End new comment form --> |
| |
| </section> |
| |
| </div> |
| |
| |
| </article> |
| |
| |
| |
| <div class="page__related"> |
| <h4 class="page__related-title">猜您还喜欢</h4> |
| <div class="grid__wrapper"> |
| |
| |
| |
| |
| |
| <div class="grid__item"> |
| <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork"> |
| |
| <h2 class="archive__item-title" itemprop="headline"> |
| |
| <a href="/cn/docs/playing-on-the-open-source-community-with-Apache-ServiceComb-GDUT/" rel="permalink">与Apache ServiceComb一起玩开源-广工站 (PPT Download) |
| </a> |
| |
| </h2> |
| <p class="archive__item-excerpt" itemprop="description">与Apache ServiceComb一起玩开源-广工站 (PPT Download) |
| </p> |
| |
| <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> |
| |
| |
| |
| |
| 少于 1 分钟 阅读 |
| |
| </p> |
| |
| </article> |
| </div> |
| |
| |
| |
| |
| |
| |
| <div class="grid__item"> |
| <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork"> |
| |
| <h2 class="archive__item-title" itemprop="headline"> |
| |
| <a href="/cn/docs/servicecomb-service-center-client/" rel="permalink">使用ServiceComb客户端轻松调用ServiceCenter |
| </a> |
| |
| </h2> |
| <p class="archive__item-excerpt" itemprop="description">使用ServiceComb客户端轻松调用ServiceCenter |
| </p> |
| |
| <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> |
| |
| |
| |
| |
| 2 分钟 阅读 |
| |
| </p> |
| |
| </article> |
| </div> |
| |
| |
| |
| |
| |
| |
| <div class="grid__item"> |
| <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork"> |
| |
| <h2 class="archive__item-title" itemprop="headline"> |
| |
| <a href="/cn/docs/playing-on-the-open-source-community-with-Apache-ServiceComb-BUPT/" rel="permalink">与Apache ServiceComb一起玩开源-北邮站 (PPT Download) |
| </a> |
| |
| </h2> |
| <p class="archive__item-excerpt" itemprop="description">与Apache ServiceComb一起玩开源-北邮站 (PPT Download) |
| </p> |
| |
| <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> |
| |
| |
| |
| |
| 少于 1 分钟 阅读 |
| |
| </p> |
| |
| </article> |
| </div> |
| |
| |
| |
| |
| |
| |
| <div class="grid__item"> |
| <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork"> |
| |
| <h2 class="archive__item-title" itemprop="headline"> |
| |
| <a href="/docs/servicecomb-accept-newcapec-institute-code-donation/" rel="permalink">Apache ServiceComb Accept Code Donation From NewCapec Institute |
| </a> |
| |
| </h2> |
| <p class="archive__item-excerpt" itemprop="description">Apache ServiceComb Accept Code Donation From NewCapec Institute |
| </p> |
| |
| <p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> |
| |
| |
| |
| |
| 少于 1 分钟 阅读 |
| |
| </p> |
| |
| </article> |
| </div> |
| |
| |
| </div> |
| </div> |
| |
| </div> |
| |
| |
| <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> |
| <div align="center" style="margin: 0 0;"> |
| <ins class="adsbygoogle" |
| style="display:block; border-bottom: initial;" |
| data-ad-client="ca-pub-7328585512091257" |
| data-ad-slot="3049671934" |
| data-ad-format="auto"></ins> |
| </div> |
| |
| <div class="page__footer"> |
| <footer> |
| <!-- start custom footer snippets --> |
| |
| <!-- end custom footer snippets --> |
| |
| <div class="container"> |
| <div class="row justify-content-md-center"> |
| |
| <div class="col"> |
| <ul> |
| <p class="header">资源</p> |
| <li><a href="/cn/docs/getting-started/">入门指南</a></li> |
| <li><a href="/cn/docs/users/">用户指南</a></li> |
| <li><a href="/cn/slides/">资料</a></li> |
| <li><a href="/cn/users/faq/">常见问题</a></li> |
| </ul> |
| </div> |
| <div class="col"> |
| <ul> |
| <p class="header">ASF</p> |
| <li><a href="http://www.apache.org">基金会</a></li> |
| <li><a href="http://www.apache.org/licenses/">许可证</a></li> |
| <li><a href="http://www.apache.org/events/current-event">活动</a></li> |
| <li><a href="http://www.apache.org/foundation/sponsorship.html">赞助</a></li> |
| <li><a href="http://www.apache.org/foundation/thanks.html">鸣谢</a></li> |
| </ul> |
| </div> |
| <div class="col"> |
| <ul> |
| <p class="header">贡献</p> |
| <li><a href="http://issues.apache.org/jira/browse/SCB">报告本网页问题</a></li> |
| <li><a href="https://github.com/apache/servicecomb-website/edit/master/_posts/cn/2017-09-15-performance-test-on-seckill-with-jmeter.md">在Github上编辑此页</a></li> |
| <li><a href="/cn/developers/submit-codes/">代码提交指南</a></li> |
| <li><a href="/cn/security">安全</a></li> |
| </ul> |
| </div> |
| <div class="col"> |
| <ul class="social-icons"> |
| <p class="header">社区</p> |
| <li> |
| <a href="mailto:dev-subscribe@servicecomb.incubator.apache.org" rel="nofollow"><span class="mail">邮件列表</span></a> |
| </li> |
| <li> |
| <a href="https://github.com/apache?q=ServiceComb" target="_blank"><span class="github">Github</span></a> |
| </li> |
| <li> |
| <a href="https://twitter.com/ServiceComb" target="_blank"><span class="twitter">Twitter</span></a> |
| </li> |
| <li> |
| <a href="/feed.xml" target="_blank"><span class="rss">Feed</span></a> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </div> |
| <div class="page__footer-bottom"> |
| <div>© 2019 Apache ServiceComb. 技术来自于 <a href="http://jekyllrb.com" rel="nofollow">Jekyll</a> & <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div> |
| <div>All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div> |
| </div> |
| |
| </footer> |
| </div> |
| |
| <script src="/assets/js/main.min.js"></script> |
| |
| |
| |
| |
| <script> |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
| |
| ga('create', 'UA-101622733-1', 'auto'); |
| ga('send', 'pageview'); |
| </script> |
| |
| |
| |
| |
| |
| |
| |
| |
| <script> |
| (function ($) { |
| var $comments = $('.js-comments'); |
| |
| $('#new_comment').submit(function () { |
| var form = this; |
| |
| $(form).addClass('disabled'); |
| $('#comment-form-submit').html('<i class="fa fa-spinner fa-spin fa-fw"></i> 正在加载...'); |
| |
| $.ajax({ |
| type: $(this).attr('method'), |
| url: $(this).attr('action'), |
| data: $(this).serialize(), |
| contentType: 'application/x-www-form-urlencoded', |
| success: function (data) { |
| $('#comment-form-submit').html('已提交'); |
| $('.page__comments-form .js-notice').removeClass('notice--danger'); |
| $('.page__comments-form .js-notice').addClass('notice--success'); |
| showAlert('感谢您的评论!被批准后它会立即在此站点展示。'); |
| }, |
| error: function (err) { |
| console.log(err); |
| $('#comment-form-submit').html('提交评论'); |
| $('.page__comments-form .js-notice').removeClass('notice--success'); |
| $('.page__comments-form .js-notice').addClass('notice--danger'); |
| showAlert('很抱歉,您的提交存在错误。请确保所有必填字段都已填写正确,然后再试一次。'); |
| $(form).removeClass('disabled'); |
| } |
| }); |
| |
| return false; |
| }); |
| |
| function showAlert(message) { |
| $('.page__comments-form .js-notice').removeClass('hidden'); |
| $('.page__comments-form .js-notice-text').html(message); |
| } |
| })(jQuery); |
| </script> |
| |
| |
| |
| |
| |
| |
| |
| </body> |
| </html> |