|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
|
|
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
|
|
<head>
|
|
|
<meta charset="utf-8">
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
<title>watch — Arthas 3.1.1 documentation</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="shortcut icon" href="_static/favicon.ico"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
|
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
|
|
<link rel="stylesheet" href="_static/overrides.css" type="text/css" />
|
|
|
<link rel="index" title="Index" href="genindex.html" />
|
|
|
<link rel="search" title="Search" href="search.html" />
|
|
|
<link rel="next" title="Fundamental Fields in Expressions" href="advice-class.html" />
|
|
|
<link rel="prev" title="monitor" href="monitor.html" />
|
|
|
<script src="_static/center_page.js"></script>
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/github.min.css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script src="_static/js/modernizr.min.js"></script>
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body class="wy-body-for-nav">
|
|
|
|
|
|
|
|
|
<div class="wy-grid-for-nav">
|
|
|
|
|
|
|
|
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
|
|
<div class="wy-side-scroll">
|
|
|
<div class="wy-side-nav-search">
|
|
|
|
|
|
|
|
|
|
|
|
<a href="index.html" class="icon icon-home"> Arthas
|
|
|
|
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="version">
|
|
|
3.1.1
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div role="search">
|
|
|
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
|
|
<input type="text" name="q" placeholder="Search docs" />
|
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
|
<input type="hidden" name="area" value="default" />
|
|
|
</form>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul class="current">
|
|
|
<li class="toctree-l1"><a class="reference external" href="https://alibaba.github.io/arthas/arthas-tutorials?language=en">Online tutorials(Recommend)</a></li>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="install-detail.html">Installation</a></li>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="quick-start.html">Quick start</a></li>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="advanced-use.html">Advanced usage</a></li>
|
|
|
<li class="toctree-l1 current"><a class="reference internal" href="commands.html">Commands</a><ul class="current">
|
|
|
<li class="toctree-l2"><a class="reference internal" href="dashboard.html">dashboard</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="thread.html">thread</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="jvm.html">jvm</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="sysprop.html">sysprop</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="sysenv.html">sysenv</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="mbean.html">mbean</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="getstatic.html">getstatic</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="ognl.html">ognl</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="sc.html">sc</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="sm.html">sm</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="dump.html">dump</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="jad.html">jad</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="classloader.html">classloader</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="mc.html">mc</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="redefine.html">redefine</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="monitor.html">monitor</a></li>
|
|
|
<li class="toctree-l2 current"><a class="current reference internal" href="#">watch</a><ul>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#parameters-options">Parameters & Options</a><ul>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="advice-class.html">Critical fields in</a></li>
|
|
|
<li class="toctree-l4"><a class="reference external" href="https://github.com/alibaba/arthas/issues/71">Special usages</a></li>
|
|
|
<li class="toctree-l4"><a class="reference external" href="https://commons.apache.org/proper/commons-ognl/language-guide.html">OGNL official guide</a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#usage">Usage</a><ul>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="#start-demo">Start Demo</a></li>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="#check-the-out-parameters-and-return-value">Check the <tt class="docutils literal">out parameters</tt> and <tt class="docutils literal">return value</tt></a></li>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="#check-in-parameters">Check <tt class="docutils literal">in parameters</tt></a></li>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="#check-before-and-after-at-the-same-time">Check <em>before</em> and <em>after</em> at the same time</a></li>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="#use-x-to-check-more-details">Use <tt class="docutils literal">-x</tt> to check more details</a></li>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="#use-condition-expressions-to-locate-specific-call">Use condition expressions to locate specific call</a></li>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="#check-exceptions">Check <tt class="docutils literal">exceptions</tt></a></li>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="#filter-by-time-cost">Filter by time cost</a></li>
|
|
|
<li class="toctree-l4"><a class="reference internal" href="#check-the-field-of-the-target-object">Check the field of the target object</a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="trace.html">trace</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="stack.html">stack</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="tt.html">tt</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="cat.html">cat</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="pwd.html">pwd</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="options.html">options</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="commands.html#basic-arthas-commands">Basic Arthas Commands</a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="docker.html">Docker</a></li>
|
|
|
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/issues?q=label%3Auser-case">User cases</a></li>
|
|
|
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/issues?q=label%3Aquestion-answered">Questions and answers</a></li>
|
|
|
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas">Fork me at GitHub</a></li>
|
|
|
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/blob/master/CONTRIBUTING.md">CONTRIBUTING</a></li>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="release-notes.html">Release Notes</a></li>
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
</nav>
|
|
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
|
|
|
|
|
|
|
|
<nav class="wy-nav-top" aria-label="top navigation">
|
|
|
|
|
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
|
<a href="index.html">Arthas</a>
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
<div class="wy-nav-content">
|
|
|
|
|
|
<div class="rst-content">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div role="navigation" aria-label="breadcrumbs navigation">
|
|
|
|
|
|
<ul class="wy-breadcrumbs">
|
|
|
|
|
|
<li><a href="index.html">Docs</a> »</li>
|
|
|
|
|
|
<li><a href="commands.html">All Commands</a> »</li>
|
|
|
|
|
|
<li>watch</li>
|
|
|
|
|
|
|
|
|
<li class="wy-breadcrumbs-aside">
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://github.com/alibaba/arthas/blob/master/site/src/site/sphinx/en/watch.md" class="fa fa-github"> Edit on GitHub</a>
|
|
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
<hr/>
|
|
|
</div>
|
|
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
|
<div itemprop="articleBody">
|
|
|
|
|
|
<div class="section" id="watch">
|
|
|
<span id="watch"></span><h1>watch<a class="headerlink" href="#watch" title="Permalink to this headline">¶</a></h1>
|
|
|
<p>Monitor methods in data aspect including <tt class="docutils literal">return values</tt>, <tt class="docutils literal">exceptions</tt> and <tt class="docutils literal">parameters</tt>.</p>
|
|
|
<p>With the help of <a class="reference external" href="https://commons.apache.org/proper/commons-ognl/index.html">OGNL</a>, you can easily check the details of variables when methods being invoked.</p>
|
|
|
<div class="section" id="parameters-options">
|
|
|
<span id="parameters-options"></span><h2>Parameters & Options<a class="headerlink" href="#parameters-options" title="Permalink to this headline">¶</a></h2>
|
|
|
<p>There are four different scenarios for <tt class="docutils literal">watch</tt> command, which makes it rather complicated.</p>
|
|
|
<table border="1" class="docutils">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th align="right">Name</th>
|
|
|
<th align="left">Specification</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
<td align="right"><em>class-pattern</em></td>
|
|
|
<td align="left">pattern for the class name</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td align="right"><em>method-pattern</em></td>
|
|
|
<td align="left">pattern for the method name</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td align="right"><em>expression</em></td>
|
|
|
<td align="left">expression to monitor</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td align="right"><em>condition-expression</em></td>
|
|
|
<td align="left">condition expression to filter</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td align="right">[b]</td>
|
|
|
<td align="left">before method being invoked</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td align="right">[e]</td>
|
|
|
<td align="left">when method encountering exceptions</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td align="right">[s]</td>
|
|
|
<td align="left">when method exits normally</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td align="right">[f]</td>
|
|
|
<td align="left">when method exits (either succeed or fail with exceptions)</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td align="right">[E]</td>
|
|
|
<td align="left">turn on regex matching while the default is wildcard matching</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td align="right">[x:]</td>
|
|
|
<td align="left">the depth to print the specified property with default value: 1</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table><p>F.Y.I</p>
|
|
|
<ol class="simple">
|
|
|
<li>any valid OGNL expression as <tt class="docutils literal">"{params,returnObj}"</tt> supported</li>
|
|
|
<li>there are four <em>watching</em> points: <tt class="docutils literal">-b</tt>, <tt class="docutils literal">-e</tt>, <tt class="docutils literal">-s</tt> and <tt class="docutils literal">-f</tt> (the first three are off in default while <tt class="docutils literal">-f</tt> on);</li>
|
|
|
<li>at the <em>watching</em> point, Arthas will use the <em>expression</em> to evaluate the variables and print them out;</li>
|
|
|
<li><tt class="docutils literal">in parameters</tt> and <tt class="docutils literal">out parameters</tt> are different since they can be modified within the invoked methods; <tt class="docutils literal">params</tt> stands for <tt class="docutils literal">in parameters</tt> in <tt class="docutils literal">-b</tt>while <tt class="docutils literal">out parameters</tt> in other <em>watching</em> points;</li>
|
|
|
<li>there are no <tt class="docutils literal">return values</tt> and <tt class="docutils literal">exceptions</tt> when using <tt class="docutils literal">-b</tt>.</li>
|
|
|
</ol>
|
|
|
<p>Advanced:</p>
|
|
|
<div class="toctree-wrapper compound">
|
|
|
<ul>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="advice-class.html">Critical fields in</a></li>
|
|
|
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/issues/71">Special usages</a></li>
|
|
|
<li class="toctree-l1"><a class="reference external" href="https://commons.apache.org/proper/commons-ognl/language-guide.html">OGNL official guide</a></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="section" id="usage">
|
|
|
<span id="usage"></span><h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
|
|
|
<div class="section" id="start-demo">
|
|
|
<span id="start-demo"></span><h3>Start Demo<a class="headerlink" href="#start-demo" title="Permalink to this headline">¶</a></h3>
|
|
|
<p>Start <tt class="docutils literal">arthas-demo</tt> in <a class="reference internal" href="quick-start.html"><span class="doc">Quick Start</span></a>.</p>
|
|
|
</div>
|
|
|
<div class="section" id="check-the-out-parameters-and-return-value">
|
|
|
<span id="check-the-out-parameters-and-return-value"></span><h3>Check the <tt class="docutils literal">out parameters</tt> and <tt class="docutils literal">return value</tt><a class="headerlink" href="#check-the-out-parameters-and-return-value" title="Permalink to this headline">¶</a></h3>
|
|
|
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">$ watch demo.MathGame primeFactors "{params,returnObj}" -x 2
|
|
|
Press Ctrl+C to abort.
|
|
|
Affect(class-cnt:1 , method-cnt:1) cost in 44 ms.
|
|
|
ts=2018-12-03 19:16:51; [cost=1.280502ms] result=@ArrayList[
|
|
|
@Object[][
|
|
|
@Integer[535629513],
|
|
|
],
|
|
|
@ArrayList[
|
|
|
@Integer[3],
|
|
|
@Integer[19],
|
|
|
@Integer[191],
|
|
|
@Integer[49199],
|
|
|
],
|
|
|
]
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="section" id="check-in-parameters">
|
|
|
<span id="check-in-parameters"></span><h3>Check <tt class="docutils literal">in parameters</tt><a class="headerlink" href="#check-in-parameters" title="Permalink to this headline">¶</a></h3>
|
|
|
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">$ watch demo.MathGame primeFactors "{params,returnObj}" -x 2 -b
|
|
|
Press Ctrl+C to abort.
|
|
|
Affect(class-cnt:1 , method-cnt:1) cost in 50 ms.
|
|
|
ts=2018-12-03 19:23:23; [cost=0.0353ms] result=@ArrayList[
|
|
|
@Object[][
|
|
|
@Integer[-1077465243],
|
|
|
],
|
|
|
null,
|
|
|
]
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<p>Compared to the previous <em>check</em>:</p>
|
|
|
<ul class="simple">
|
|
|
<li><tt class="docutils literal">return value</tt> is <tt class="docutils literal">null</tt> since it’s <tt class="docutils literal">-b</tt>.</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="section" id="check-before-and-after-at-the-same-time">
|
|
|
<span id="check-before-and-after-at-the-same-time"></span><h3>Check <em>before</em> and <em>after</em> at the same time<a class="headerlink" href="#check-before-and-after-at-the-same-time" title="Permalink to this headline">¶</a></h3>
|
|
|
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">$ watch demo.MathGame primeFactors "{params,target,returnObj}" -x 2 -b -s -n 2
|
|
|
Press Ctrl+C to abort.
|
|
|
Affect(class-cnt:1 , method-cnt:1) cost in 46 ms.
|
|
|
ts=2018-12-03 19:29:54; [cost=0.01696ms] result=@ArrayList[
|
|
|
@Object[][
|
|
|
@Integer[1544665400],
|
|
|
],
|
|
|
@MathGame[
|
|
|
random=@Random[java.util.Random@522b408a],
|
|
|
illegalArgumentCount=@Integer[13038],
|
|
|
],
|
|
|
null,
|
|
|
]
|
|
|
ts=2018-12-03 19:29:54; [cost=4.277392ms] result=@ArrayList[
|
|
|
@Object[][
|
|
|
@Integer[1544665400],
|
|
|
],
|
|
|
@MathGame[
|
|
|
random=@Random[java.util.Random@522b408a],
|
|
|
illegalArgumentCount=@Integer[13038],
|
|
|
],
|
|
|
@ArrayList[
|
|
|
@Integer[2],
|
|
|
@Integer[2],
|
|
|
@Integer[2],
|
|
|
@Integer[5],
|
|
|
@Integer[5],
|
|
|
@Integer[73],
|
|
|
@Integer[241],
|
|
|
@Integer[439],
|
|
|
],
|
|
|
]
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<p>F.Y.I</p>
|
|
|
<ul class="simple">
|
|
|
<li><tt class="docutils literal">-n 2</tt>: threshold of execution times is 2.</li>
|
|
|
<li>the first block of output is the <em>before watching</em> point;</li>
|
|
|
<li>*the order of the output determined by the <em>watching</em> order itself (nothing to do with the order of the options <tt class="docutils literal">-b -s</tt>).</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="section" id="use-x-to-check-more-details">
|
|
|
<span id="use-x-to-check-more-details"></span><h3>Use <tt class="docutils literal">-x</tt> to check more details<a class="headerlink" href="#use-x-to-check-more-details" title="Permalink to this headline">¶</a></h3>
|
|
|
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">$ watch demo.MathGame primeFactors "{params,target}" -x 3
|
|
|
Press Ctrl+C to abort.
|
|
|
Affect(class-cnt:1 , method-cnt:1) cost in 58 ms.
|
|
|
ts=2018-12-03 19:34:19; [cost=0.587833ms] result=@ArrayList[
|
|
|
@Object[][
|
|
|
@Integer[47816758],
|
|
|
],
|
|
|
@MathGame[
|
|
|
random=@Random[
|
|
|
serialVersionUID=@Long[3905348978240129619],
|
|
|
seed=@AtomicLong[3133719055989],
|
|
|
multiplier=@Long[25214903917],
|
|
|
addend=@Long[11],
|
|
|
mask=@Long[281474976710655],
|
|
|
DOUBLE_UNIT=@Double[1.1102230246251565E-16],
|
|
|
BadBound=@String[bound must be positive],
|
|
|
BadRange=@String[bound must be greater than origin],
|
|
|
BadSize=@String[size must be non-negative],
|
|
|
seedUniquifier=@AtomicLong[-3282039941672302964],
|
|
|
nextNextGaussian=@Double[0.0],
|
|
|
haveNextNextGaussian=@Boolean[false],
|
|
|
serialPersistentFields=@ObjectStreamField[][isEmpty=false;size=3],
|
|
|
unsafe=@Unsafe[sun.misc.Unsafe@2eaa1027],
|
|
|
seedOffset=@Long[24],
|
|
|
],
|
|
|
illegalArgumentCount=@Integer[13159],
|
|
|
],
|
|
|
]
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<ul class="simple">
|
|
|
<li><tt class="docutils literal">-x</tt>: Expand level of object (1 by default)</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="section" id="use-condition-expressions-to-locate-specific-call">
|
|
|
<span id="use-condition-expressions-to-locate-specific-call"></span><h3>Use condition expressions to locate specific call<a class="headerlink" href="#use-condition-expressions-to-locate-specific-call" title="Permalink to this headline">¶</a></h3>
|
|
|
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">$ watch demo.MathGame primeFactors "{params[0],target}" "params[0]<0"
|
|
|
Press Ctrl+C to abort.
|
|
|
Affect(class-cnt:1 , method-cnt:1) cost in 68 ms.
|
|
|
ts=2018-12-03 19:36:04; [cost=0.530255ms] result=@ArrayList[
|
|
|
@Integer[-18178089],
|
|
|
@MathGame[demo.MathGame@41cf53f9],
|
|
|
]
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="section" id="check-exceptions">
|
|
|
<span id="check-exceptions"></span><h3>Check <tt class="docutils literal">exceptions</tt><a class="headerlink" href="#check-exceptions" title="Permalink to this headline">¶</a></h3>
|
|
|
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">$ watch demo.MathGame primeFactors "{params[0],throwExp}" -e -x 2
|
|
|
Press Ctrl+C to abort.
|
|
|
Affect(class-cnt:1 , method-cnt:1) cost in 62 ms.
|
|
|
ts=2018-12-03 19:38:00; [cost=1.414993ms] result=@ArrayList[
|
|
|
@Integer[-1120397038],
|
|
|
java.lang.IllegalArgumentException: number is: -1120397038, need >= 2
|
|
|
at demo.MathGame.primeFactors(MathGame.java:46)
|
|
|
at demo.MathGame.run(MathGame.java:24)
|
|
|
at demo.MathGame.main(MathGame.java:16)
|
|
|
,
|
|
|
]
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<ul class="simple">
|
|
|
<li><tt class="docutils literal">-e</tt>: Trigger when an exception is thrown</li>
|
|
|
<li><tt class="docutils literal">throwExp</tt>: the exception object</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="section" id="filter-by-time-cost">
|
|
|
<span id="filter-by-time-cost"></span><h3>Filter by time cost<a class="headerlink" href="#filter-by-time-cost" title="Permalink to this headline">¶</a></h3>
|
|
|
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">$ watch demo.MathGame primeFactors '{params, returnObj}' '#cost>200' -x 2
|
|
|
Press Ctrl+C to abort.
|
|
|
Affect(class-cnt:1 , method-cnt:1) cost in 66 ms.
|
|
|
ts=2018-12-03 19:40:28; [cost=2112.168897ms] result=@ArrayList[
|
|
|
@Object[][
|
|
|
@Integer[2141897465],
|
|
|
],
|
|
|
@ArrayList[
|
|
|
@Integer[5],
|
|
|
@Integer[428379493],
|
|
|
],
|
|
|
]
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<ul class="simple">
|
|
|
<li><tt class="docutils literal">#cost>200</tt> (<tt class="docutils literal">ms</tt>) filter out all invokings that take less than <tt class="docutils literal">200ms</tt>.</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="section" id="check-the-field-of-the-target-object">
|
|
|
<span id="check-the-field-of-the-target-object"></span><h3>Check the field of the target object<a class="headerlink" href="#check-the-field-of-the-target-object" title="Permalink to this headline">¶</a></h3>
|
|
|
<ul class="simple">
|
|
|
<li><tt class="docutils literal">target</tt> is the <tt class="docutils literal">this</tt> object in java.</li>
|
|
|
</ul>
|
|
|
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">$ watch demo.MathGame primeFactors 'target'
|
|
|
Press Ctrl+C to abort.
|
|
|
Affect(class-cnt:1 , method-cnt:1) cost in 52 ms.
|
|
|
ts=2018-12-03 19:41:52; [cost=0.477882ms] result=@MathGame[
|
|
|
random=@Random[java.util.Random@522b408a],
|
|
|
illegalArgumentCount=@Integer[13355],
|
|
|
]
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<ul class="simple">
|
|
|
<li><tt class="docutils literal">target.field_name</tt>: the field of the current object.</li>
|
|
|
</ul>
|
|
|
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">$ watch demo.MathGame primeFactors 'target.illegalArgumentCount'
|
|
|
Press Ctrl+C to abort.
|
|
|
Affect(class-cnt:1 , method-cnt:1) cost in 67 ms.
|
|
|
ts=2018-12-03 20:04:34; [cost=131.303498ms] result=@Integer[8]
|
|
|
ts=2018-12-03 20:04:35; [cost=0.961441ms] result=@Integer[8]
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
<footer>
|
|
|
|
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
|
|
|
|
|
<a href="advice-class.html" class="btn btn-neutral float-right" title="Fundamental Fields in Expressions" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
|
|
|
|
|
|
|
|
<a href="monitor.html" class="btn btn-neutral" title="monitor" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
|
|
<div role="contentinfo">
|
|
|
<p>
|
|
|
© Copyright 2018-2019, Alibaba Middleware Group, and contributors.
|
|
|
|
|
|
</p>
|
|
|
</div>
|
|
|
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
|
|
|
|
</footer>
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
var DOCUMENTATION_OPTIONS = {
|
|
|
URL_ROOT:'./',
|
|
|
VERSION:'3.1.1',
|
|
|
LANGUAGE:'en',
|
|
|
COLLAPSE_INDEX:false,
|
|
|
FILE_SUFFIX:'.html',
|
|
|
HAS_SOURCE: true,
|
|
|
SOURCELINK_SUFFIX: '.txt'
|
|
|
};
|
|
|
</script>
|
|
|
<script type="text/javascript" src="_static/jquery.js"></script>
|
|
|
<script type="text/javascript" src="_static/underscore.js"></script>
|
|
|
<script type="text/javascript" src="_static/doctools.js"></script>
|
|
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="_static/js/theme.js"></script>
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
jQuery(function () {
|
|
|
SphinxRtdTheme.Navigation.enable(true);
|
|
|
});
|
|
|
</script>
|
|
|
<div class="github-fork-ribbon-wrapper right">
|
|
|
<div class="github-fork-ribbon">
|
|
|
<a href="https://github.com/alibaba/arthas" target="_blank">Fork me at GitHub</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript" src="_static/add_badges.js"></script>
|
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.5.0/highlightjs-line-numbers.min.js"></script>
|
|
|
<script>
|
|
|
document.querySelectorAll('div.hljs > pre').forEach(function(block) {
|
|
|
hljs.highlightBlock(block);
|
|
|
hljs.lineNumbersBlock(block);
|
|
|
});
|
|
|
</script>
|
|
|
|
|
|
<script>
|
|
|
var _hmt = _hmt || [];
|
|
|
(function() {
|
|
|
var hm = document.createElement("script");
|
|
|
hm.src = "https://hm.baidu.com/hm.js?d5c5e25b100f0eb51a4c35c8a86ea9b4";
|
|
|
var s = document.getElementsByTagName("script")[0];
|
|
|
s.parentNode.insertBefore(hm, s);
|
|
|
})();
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
</html> |