如何分析线程的堆栈跟踪信息?

编程入门 行业动态 更新时间:2024-10-06 16:17:30
本文介绍了如何分析线程的堆栈跟踪信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试监视我的应用的性能;

I'm trying to monitor performance of my app;

当CPU使用率超载时,我将可疑线程和主线程的堆栈跟踪以两个库的形式转储为字符串: github/bestswifter/BSBacktraceLogger github/plausiblelabs/plcrashreporter

When cpu usage overloads, I dump the stack trace of the suspicious thread and main thread as string by two libs: github/bestswifter/BSBacktraceLogger github/plausiblelabs/plcrashreporter

以下是我记录的一个线程的堆栈跟踪,但是它无法帮助我分析和定位性能问题所在的位置.

Following are the stack trace of one thread that I record, but it cannot help me analyze and locate where the performance issue is.

我做错了还是如何分析线程的堆栈跟踪?

Am I doing wrong or how can I analyze the stack trace of a thread?

推荐答案

好!我有点明白你的问题.您的应用程序是关于什么的?我的意思是说它是游戏之类的东西?有了这些信息,我将为您提供一些解决方法,

Ohkay ! I somewhat got your problem. What is your app about,? I mean is it a Game or something.? With this very info, I'll give you few workarounds,

  • 我建议您彻底研究代码并取消初始化所有未使用的资源.
  • 检查您使用了多少静态属性和全局变量/属性,并问自己甚至还需要它们吗?
  • 我也再次建议您在内存条变高或变低时,使用Instruments的外观非常精确地监视应用程序.通过打开它吃了很多的ViewController,或者通过关闭它关闭的ViewController,内存条下降了,您的应用是否依赖于大型应用程序中的GPS coz,例如uber,它们不更新didUpdateLocations上的位置,而是使用其他方法,例如单例/计时器/心跳等,]
  • 此外,如果您想避免所有这些手动工作,请选择NewRelic

为此目的编写的一个小型教程:链接

A small tutorial for that : link

再次发布以获取更多信息,将很乐意为您提供帮助. =)

Post again for more, Would be happy to help. =)

以下是一些链接:通过将它们与firebase结合使用,您还可以查看事件和日志, 这是第一-> 看门狗

Here are some links : by using and combining them with firebase you'll be able to see events and logs as well, here's 1st -> watchdog

这是第二个1-> 打印文件名,函数名,行号和text..etc.

现在将其中任何一个与 firebase 结合起来,它将发送直接登录到您.

Now combine any of that with firebase and it'll send the logs to you directly.

更多推荐

如何分析线程的堆栈跟踪信息?

本文发布于:2023-11-12 20:56:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582509.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:堆栈   线程   信息

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!