简体   繁体   English

有没有办法用Java代码对您的计算机进行基准测试?

[英]Is there way to benchmark your computer with java code?

I'm java developer and my goal is to understand which computer is best suited for some statistical evaluation. 我是java开发人员,我的目标是了解哪种计算机最适合某些统计评估。 I have 3 different desktops with different os(Windows 7, MacOS, Ubuntu). 我有3个不同的桌面与不同的操作系统(Windows 7,MacOS,Ubuntu)。 JVM based program seems best suited for this benchmark. 基于JVM的程序似乎最适合此基准测试。 Is there some maven besed package which I can put to dependency and run on all these desktops to get HDD/CPU/Memory benchmark? 是否有一些maven besed包我可以依赖并在所有这些桌面上运行以获得HDD / CPU /内存基准?

The question is about java libraries which provides CPU/IO/memory benchmarks... 问题是关于提供CPU / IO /内存基准的java库......

Not in any meaningful way, AFAIK. 没有任何有意义的方式,AFAIK。 The purpose you have proposed "some statistical evaluation" is too broad for meaningful benchmarking. 您提出的“一些统计评估”的目的太广泛,无法进行有意义的基准测试。

In fact, the only meaningful approach would be to: 事实上,唯一有意义的方法是:

  1. Select the statistical application that you are going to use. 选择您要使用的统计应用程序。
  2. Select a bunch of representative problems; 选择一堆有代表性的问题; ie problems that are typically of what you are going to be doing ... in both quality and "size". 即问题,通常是你将要做的......质量和“大小”。
  3. Code the solutions using your selected application. 使用您选择的应用程序对解决方案进
  4. Run the solutions, and measure the times taken. 运行解决方案,并测量所用的时间。
  5. Tune the solutions / application and repeat the previous step until you are satisfied that you are getting the best performance out of the application. 调整解决方案/应用程序并重复上一步,直到您确信从应用程序中获得最佳性能。
  6. Run the application on the candidate machines. 在候选计算机上运行该应用程序。
  7. Compare the times, across all of your problems on all machines. 比较所有机器上所有问题的时间。

I would posit that unless you are trying to run really large analyses on an underpowered machine, it is not going to make much difference which OS you use. 我认为除非你试图在动力不足的机器上运行非常大的分析,否则你使用哪种操作系统并没有多大区别。 The critical issues are likely to be using a fast enough machine with enough memory (if the analysis requires lots of memory), picking the right application, coding the solutions correctly, and tuning the application. 关键问题可能是使用足够快的机器和足够的内存(如果分析需要大量内存),选择正确的应用程序,正确编码解决方案,以及调整应用程序。 The choice of OS probably won't matter ... unless you push the memory envelope too hard. 操作系统的选择可能无关紧要......除非你太过努力地推动内存包络。


I will disagree. 我不同意。 If what you are saying is correct there were no such think as SUperPI, 3DMark etc. Only problem with that stuff it is OS specific so I can compare 2 windows laptops only. 如果您所说的是正确的,那么就没有像SUperPI,3DMark等那样的想法。只有那些东西的问题是操作系统特定的所以我只能比较2台Windows笔记本电脑。 Performance can be easly measured with elemntal operations such as write/read disk/memmory. 通过诸如写/读盘/存储器之类的元件操作可以很容易地测量性能。 Arithmetical operations. 算术运算。 Thats is actaully universe of possible computer operations. 多数民众赞成是可能的计算机操作的宇宙。

Well fine. 好吧。

If you think you can find a meaningful benchmark that compares application-level performance across different OSes ... go find one. 如果您认为可以找到一个有意义的基准来比较不同操作系统的应用程序级性能...请找一个。

And if you think such a benchmark is going to give you numbers that are applicable to running Java statistical analysis tools, feel free to use it. 如果您认为这样的基准测试会为您提供适用于运行Java统计分析工具的数字,请随意使用它。 (Hint: the OS-specific benchmarks like SUperPI, 3DMark, etc are not great predictors of performance running applications.) (提示:特定于操作系统的基准测试,如SUperPI,3DMark等,并不是性能运行应用程序的重要预测指标。)

And if you think that Java application performance is only about how fast disk read/write, memory read/write and basic arithmetic instructions ... feel free to continue believing that. 如果您认为Java应用程序性能只是关于磁盘读/写速度,内存读/写和基本算术指令的速度......请随时继续相信。

Unfortunately, reality is very different. 不幸的是,现实是非常不同的。


But my guess is that doesn't make a lot of difference what OS you choose, provided that the hardware is up to it. 但我的猜测是,如果硬件符合要求,那么您选择的操作系统并没有太大的区别。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有没有办法对Java程序的启动进行基准测试? - Is there a way to benchmark a Java program's startup? 如何让您的计算机更改 Java 路径 - How to Make Your Computer Change Java Path 如何使用Eclipse查找Java方法/代码的运行时间/基准? - How to find elapsed time/benchmark a Java method/code using Eclipse? 如何用Java检测打印机是否已连接到计算机? - How to detect whether Printer is attached to your computer or not in Java? 使用Java从您的计算机发送邮件有什么要求? - sending mail from your computer using java what required? “解压缩代码树并将该代码树的根目录添加到您计算机的 CLASSPATH 环境变量中”是什么意思。 意思? (Java Mac OSx) - What does "Unzip the code tree and add the root directory of that code tree to your computer’s CLASSPATH environment variable." mean? (Java Mac OSx) 如何以有意义的方式在您的代码中使用 Selenium Java 中的 Extent Reports? - How to make use of Extent Reports in Seleniium Java in your code in a meaningful way? 有没有办法通过方法回调在代码中捕获Java中的对象分配? - Is there a way to trap object allocation in Java inside your code through a method callback? 用Java服务将jsvc打包为源代码,然后让使用它的人在使用之前进行编译是最好的方法吗? - Is the best way to package jsvc with your java service as source code, then have people who use it compile before using? Java Web框架基准测试 - Java web framework benchmark
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM