Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/12411#discussion_r59988234
--- Diff: core/src/main/scala/org/apache/spark/util/Benchmark.scala ---
@@ -96,9 +96,9 @@ private[spark] object Benchmark {
Utils.executeAndGetOutput(Seq("/usr/sbin/sysctl", "-n",
"machdep.cpu.brand_string"))
} else if (SystemUtils.IS_OS_LINUX) {
Try {
- val grepPath = Utils.executeAndGetOutput(Seq("which", "grep"))
+ val grepPath = Utils.executeAndGetOutput(Seq("which",
"grep")).stripLineEnd
Utils.executeAndGetOutput(Seq(grepPath, "-m", "1", "model name",
"/proc/cpuinfo"))
- .replaceFirst("model name[\\s*]:[\\s*]", "")
+ .stripLineEnd.replaceFirst("model name[\\s*]:[\\s*]", "")
--- End diff --
Without this ```stripLineEnd```, the result looks as follows (add a blank
line after processor name):
```
Java HotSpot(TM) 64-Bit Server VM 1.8.0_66-b17 on Linux
2.6.32-504.el6.x86_64
Intel(R) Xeon(R) CPU E5-2667 v2 @ 3.30GHz
back-to-back filter: Best/Avg Time(ms) Rate(M/s) Per
Row(ns) Relative
-------------------------------------------------------------------------------------------
Dataset 490 / 502 20.4
49.0 1.0X
DataFrame 55 / 61 183.4
5.5 9.0X
RDD 210 / 237 47.7
21.0 2.3X
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]