【问题标题】:How to measure Eclipse startup time?如何测量 Eclipse 启动时间?
【发布时间】:2018-09-15 14:47:04
【问题描述】:

如何测量Eclipse的启动时间,即。 Eclipse 启动所需的时间?

“启动持续时间”为:

  1. eclipseeclipse.exe命令开始执行
  2. Eclipse UI 启动并可用(大约在用户可以使用鼠标、菜单和编辑器时)

在 Bash Shell 中,我测试了 time 命令,但是,直到 ~/path/to/eclipse/eclipse 进程被关闭/杀死,它才会回复。

~$ time ~/path/to/eclipse/eclipse
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized.  Will retry after the state location is initialized.
[...] truncated
16:12:32,920 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@4df07ddd - Registering current configuration as safe fallback point
^ here I closed Eclipse UI

real    0m11.724s
user    0m35.608s
sys 0m0.868s

如何做到这一点?

编辑:

背景/初始目标

  1. 比较不同 Eclipse 之间的 Eclipse 启动持续时间 配置(eclipse.ini)。 (见How can you speed up Eclipse?
  2. 查看配置更改对 Eclipse 启动时间

注意:当前在 Ubuntu 上运行 Eclipse。欢迎对 WindowsLinux 平台提出任何建议。

【问题讨论】:

  • 使用秒表。说真的。
  • 感谢您的提示,但我有一些更精确的想法;)并且可以很容易地重复(例如计算平均值)。目前正在基于日志解析进行此工作
  • 好吧,我说使用秒表的原因是我认为您找不到更好的东西。或者至少,不是不修改 Eclipse。

标签: eclipse performance shell time performance-testing


【解决方案1】:

Vogel 在此处描述了一个内置解决方案: https://www.vogella.com/tutorials/EclipsePerformance/article.html#using-the-build-in-tracing-facilities-of-eclipse

要点是在您放在 Eclipse 安装文件夹中的文件 .options 中设置一些首选项:

# turn on debugging for the org.eclipse.core plugin.
org.eclipse.osgi/debug=true
# turn on execution time of the activator for the plug-ins
org.eclipse.osgi/debug/bundleTime=true
# turn on total execution time of the plug-ins
org.eclipse.osgi/debug/bundleStartTime=true

然后通过以下命令行启动 Eclipse。

./eclipse -debug

然后他甚至提供了一组很好的小脚本来帮助破译踪迹。 它从osgi组件测量每个人的启动时间/激活时间。

【讨论】:

    猜你喜欢
    • 2013-04-08
    • 1970-01-01
    • 2018-12-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-15
    • 2013-06-17
    相关资源
    最近更新 更多