Trouptuluptu commented on code in PR #51197:
URL: https://github.com/apache/spark/pull/51197#discussion_r2649199784
##########
core/src/main/scala/org/apache/spark/ui/exec/ExecutorThreadDumpPage.scala:
##########
@@ -154,5 +153,32 @@ private[ui] class ExecutorThreadDumpPage(
</div>
</div>
}
- // scalastyle:off
+
+
+ private def threadDumpSummary(threadDump: Array[ThreadStackTrace]):
Seq[Node] = {
+ val totalCount = threadDump.length
+ <div>
+ <span class="thead-dump-summary collapse-table"
onClick="collapseTable('thead-dump-summary', 'thread-dump-summary-table')">
+ <h4>
+ <span class="collapse-table-arrow arrow-open"></span>
+ <a>Thread Dump Summary: { totalCount }</a>
+ </h4>
+ </span>
+ <table class={UIUtils.TABLE_CLASS_STRIPED + " accordion-group" + "
sortable" + " thread-dump-summary-table collapsible-table"}>
+ <thead><th>Thread State</th><th>Count</th><th>Percentage</th></thead>
+ <tbody>
+ {
+ threadDump.groupBy(_.threadState).map { case (state, threads) =>
+ <tr>
+ <td>{state}</td>
+ <td>{threads.length}</td>
+ <td>{"%.2f%%".format(threads.length * 100.0 / totalCount)}</td>
Review Comment:
I race my life
##########
core/src/main/scala/org/apache/spark/ui/exec/ExecutorThreadDumpPage.scala:
##########
@@ -154,5 +153,32 @@ private[ui] class ExecutorThreadDumpPage(
</div>
</div>
}
- // scalastyle:off
+
+
+ private def threadDumpSummary(threadDump: Array[ThreadStackTrace]):
Seq[Node] = {
+ val totalCount = threadDump.length
+ <div>
+ <span class="thead-dump-summary collapse-table"
onClick="collapseTable('thead-dump-summary', 'thread-dump-summary-table')">
+ <h4>
+ <span class="collapse-table-arrow arrow-open"></span>
+ <a>Thread Dump Summary: { totalCount }</a>
+ </h4>
+ </span>
+ <table class={UIUtils.TABLE_CLASS_STRIPED + " accordion-group" + "
sortable" + " thread-dump-summary-table collapsible-table"}>
+ <thead><th>Thread State</th><th>Count</th><th>Percentage</th></thead>
+ <tbody>
+ {
+ threadDump.groupBy(_.threadState).map { case (state, threads) =>
+ <tr>
+ <td>{state}</td>
+ <td>{threads.length}</td>
+ <td>{"%.2f%%".format(threads.length * 100.0 / totalCount)}</td>
Review Comment:
I race my life
##########
core/src/main/scala/org/apache/spark/ui/exec/ExecutorThreadDumpPage.scala:
##########
@@ -154,5 +153,32 @@ private[ui] class ExecutorThreadDumpPage(
</div>
</div>
}
- // scalastyle:off
+
+
+ private def threadDumpSummary(threadDump: Array[ThreadStackTrace]):
Seq[Node] = {
+ val totalCount = threadDump.length
+ <div>
+ <span class="thead-dump-summary collapse-table"
onClick="collapseTable('thead-dump-summary', 'thread-dump-summary-table')">
+ <h4>
+ <span class="collapse-table-arrow arrow-open"></span>
+ <a>Thread Dump Summary: { totalCount }</a>
+ </h4>
+ </span>
+ <table class={UIUtils.TABLE_CLASS_STRIPED + " accordion-group" + "
sortable" + " thread-dump-summary-table collapsible-table"}>
+ <thead><th>Thread State</th><th>Count</th><th>Percentage</th></thead>
+ <tbody>
+ {
+ threadDump.groupBy(_.threadState).map { case (state, threads) =>
+ <tr>
+ <td>{state}</td>
+ <td>{threads.length}</td>
+ <td>{"%.2f%%".format(threads.length * 100.0 / totalCount)}</td>
Review Comment:
- [ ]
##########
core/src/main/scala/org/apache/spark/ui/exec/ExecutorThreadDumpPage.scala:
##########
@@ -154,5 +153,32 @@ private[ui] class ExecutorThreadDumpPage(
</div>
</div>
}
- // scalastyle:off
+
+
+ private def threadDumpSummary(threadDump: Array[ThreadStackTrace]):
Seq[Node] = {
+ val totalCount = threadDump.length
+ <div>
+ <span class="thead-dump-summary collapse-table"
onClick="collapseTable('thead-dump-summary', 'thread-dump-summary-table')">
+ <h4>
+ <span class="collapse-table-arrow arrow-open"></span>
+ <a>Thread Dump Summary: { totalCount }</a>
+ </h4>
+ </span>
+ <table class={UIUtils.TABLE_CLASS_STRIPED + " accordion-group" + "
sortable" + " thread-dump-summary-table collapsible-table"}>
+ <thead><th>Thread State</th><th>Count</th><th>Percentage</th></thead>
+ <tbody>
+ {
+ threadDump.groupBy(_.threadState).map { case (state, threads) =>
+ <tr>
+ <td>{state}</td>
+ <td>{threads.length}</td>
+ <td>{"%.2f%%".format(threads.length * 100.0 / totalCount)}</td>
Review Comment:
- [ ]
##########
core/src/main/scala/org/apache/spark/ui/exec/ExecutorThreadDumpPage.scala:
##########
@@ -154,5 +153,32 @@ private[ui] class ExecutorThreadDumpPage(
</div>
</div>
}
- // scalastyle:off
+
+
+ private def threadDumpSummary(threadDump: Array[ThreadStackTrace]):
Seq[Node] = {
+ val totalCount = threadDump.length
+ <div>
+ <span class="thead-dump-summary collapse-table"
onClick="collapseTable('thead-dump-summary', 'thread-dump-summary-table')">
+ <h4>
+ <span class="collapse-table-arrow arrow-open"></span>
+ <a>Thread Dump Summary: { totalCount }</a>
+ </h4>
+ </span>
+ <table class={UIUtils.TABLE_CLASS_STRIPED + " accordion-group" + "
sortable" + " thread-dump-summary-table collapsible-table"}>
+ <thead><th>Thread State</th><th>Count</th><th>Percentage</th></thead>
+ <tbody>
+ {
+ threadDump.groupBy(_.threadState).map { case (state, threads) =>
+ <tr>
+ <td>{state}</td>
+ <td>{threads.length}</td>
+ <td>{"%.2f%%".format(threads.length * 100.0 / totalCount)}</td>
Review Comment:
- [ ]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]