Skip to content

Commit

Permalink
Added flag to specify tick minimum ms in /profiler monitor start
Browse files Browse the repository at this point in the history
  • Loading branch information
boxbeam committed Aug 29, 2021
1 parent c6d0e0a commit 6a553fc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion javadoc/index-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -3619,7 +3619,7 @@ <h2 class="title" id="I:S">S</h2>
<dd>&nbsp;</dd>
<dt><span class="member-name-link"><a href="redempt/redlib/dev/profiler/ProfilerCommands.html#start(org.bukkit.command.CommandSender)">start(CommandSender)</a></span> - Method in class redempt.redlib.dev.profiler.<a href="redempt/redlib/dev/profiler/ProfilerCommands.html" title="class in redempt.redlib.dev.profiler">ProfilerCommands</a></dt>
<dd>&nbsp;</dd>
<dt><span class="member-name-link"><a href="redempt/redlib/dev/profiler/ProfilerCommands.html#startMonitor(org.bukkit.command.CommandSender)">startMonitor(CommandSender)</a></span> - Method in class redempt.redlib.dev.profiler.<a href="redempt/redlib/dev/profiler/ProfilerCommands.html" title="class in redempt.redlib.dev.profiler">ProfilerCommands</a></dt>
<dt><span class="member-name-link"><a href="redempt/redlib/dev/profiler/ProfilerCommands.html#startMonitor(org.bukkit.command.CommandSender,java.lang.Integer)">startMonitor(CommandSender, Integer)</a></span> - Method in class redempt.redlib.dev.profiler.<a href="redempt/redlib/dev/profiler/ProfilerCommands.html" title="class in redempt.redlib.dev.profiler">ProfilerCommands</a></dt>
<dd>&nbsp;</dd>
<dt><span class="member-name-link"><a href="redempt/redlib/dev/profiler/Profiler.html#stop()">stop()</a></span> - Method in class redempt.redlib.dev.profiler.<a href="redempt/redlib/dev/profiler/Profiler.html" title="class in redempt.redlib.dev.profiler">Profiler</a></dt>
<dd>
Expand Down
2 changes: 1 addition & 1 deletion javadoc/member-search-index.js

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions javadoc/redempt/redlib/dev/profiler/ProfilerCommands.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ <h2>Method Summary</h2>
<div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#start(org.bukkit.command.CommandSender)">start</a></span>&#8203;(org.bukkit.command.CommandSender&nbsp;sender)</code></div>
<div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#startMonitor(org.bukkit.command.CommandSender)">startMonitor</a></span>&#8203;(org.bukkit.command.CommandSender&nbsp;sender)</code></div>
<div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#startMonitor(org.bukkit.command.CommandSender,java.lang.Integer)">startMonitor</a></span>&#8203;(org.bukkit.command.CommandSender&nbsp;sender,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>&nbsp;minimum)</code></div>
<div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">&nbsp;</div>
<div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>void</code></div>
<div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#stop(org.bukkit.command.CommandSender)">stop</a></span>&#8203;(org.bukkit.command.CommandSender&nbsp;sender)</code></div>
Expand Down Expand Up @@ -296,9 +297,10 @@ <h3>clear</h3>
</section>
</li>
<li>
<section class="detail" id="startMonitor(org.bukkit.command.CommandSender)">
<section class="detail" id="startMonitor(org.bukkit.command.CommandSender,java.lang.Integer)">
<h3>startMonitor</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">startMonitor</span>&#8203;<span class="parameters">(org.bukkit.command.CommandSender&nbsp;sender)</span></div>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">startMonitor</span>&#8203;<span class="parameters">(org.bukkit.command.CommandSender&nbsp;sender,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>&nbsp;minimum)</span></div>
</section>
</li>
<li>
Expand Down
2 changes: 1 addition & 1 deletion res/command.rdcml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ structure,struct {
profiler,rprofiler {
permission redlib.dev
monitor {
start {
start int:--minimum {
help Starts the tick monitor profiler
hook startmonitor
}
Expand Down
5 changes: 4 additions & 1 deletion src/redempt/redlib/dev/profiler/ProfilerCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ public void clear(CommandSender sender) {
}

@CommandHook("startmonitor")
public void startMonitor(CommandSender sender) {
public void startMonitor(CommandSender sender, Integer minimum) {
if (minimum != null) {
TickMonitorProfiler.setTickMinimum(minimum);
}
TickMonitorProfiler.start();
sender.sendMessage(ChatColor.YELLOW + "Tick monitor profiler started.");
}
Expand Down

0 comments on commit 6a553fc

Please sign in to comment.