术语“仪器化”是什么意思?

发布于 2024-12-25 17:50:51 字数 79 浏览 0 评论 0原文

正如标题所示。很多解释确实很模糊,谁能提供更可靠的定义?

该术语在 Android 测试中被大量使用,但我认为它不仅限于该平台。

As the title suggests. Many explanations are really vague, can anyone provide a more solid definition?

The term is used a lot in Android testing, but I don't think it's restricted to that platform.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

忘年祭陌 2025-01-01 17:50:51

一些性能测量工具向代码中添加了检测。例如,它们可以进行二进制翻译,并添加指令以在函数的开头和结尾处读取计时器。或者,可以通过自动化工具或程序员将这种仪器、计时器的读取添加到汇编或C代码中。

其他性能测量工具不会更改正在测量的代码。例如,UNIX prof 采样运行在定时器中断处调用的特殊代码,该代码生成接收中断的指令的直方图。

有些工具是混合的:例如,UNIX gprof 将 prof 风格的中断采样与编译器 -pg 选项添加的 mcount 检测相结合,以计算哪些函数相互调用。

所有性能测量都有开销,但仪器往往比基于中断的采样具有更多开销。另一方面,仪器仪表可以测量更多的东西。

Some performance measurement tools add instrumentation to the code. E.g. they may binary translate, and add instructions to read the timers at the beginning and end of functions. Or this instrumentation, this reading of the timers, may be added to assembly, or C code, by an automated tool, or a programmer.

Other performance measurement tools do not change the code that is being measured. E.g. UNIX prof sampling runs special code that is invoked at the timer interrupt, which generates a histogram of the instruction at which the interrupt is received.

Some tools are hybrid: e.g. UNIX gprof combines prof-style interrupt sampling with mcount instrumentation added by the compiler -pg option to count which functions call each other.

All performance measurement has overhead, but instrumentation tends to have more overhead than interrupt based sampling. On the other hand, instrumentation can measure more stuff.

余厌 2025-01-01 17:50:51

好吧,我访问了此链接,它说:

在计算机编程中,仪表化是指监视或测量产品性能水平、诊断错误和写入跟踪信息的能力。程序员以代码指令的形式实现仪表化监视系统中的特定组件(例如,指令可能会输出日志记录信息以显示在屏幕上)。当应用程序包含检测代码时,可以使用管理工具对其进行管理。需要使用仪器来检查应用程序的性能。检测方法可以有两种类型:源检测和二进制检测。

快乐编码

Well, I visited this link and it said:

In context of computer programming, instrumentation refers to an ability to monitor or measure the level of a product's performance, to diagnose errors and to write trace information. Programmers implement instrumentation in the form of code instructions that monitor specific components in a system (for example, instructions may output logging information to appear on screen). When an application contains instrumentation code, it can be managed using a management tool. Instrumentation is necessary to review the performance of the application. Instrumentation approaches can be of two types, source instrumentation and binary instrumentation.

Happy coding

与酒说心事 2025-01-01 17:50:51

根据 Oracle

检测是将字节码添加到方法中,以实现
收集供工具使用的数据的目的。自从发生了这些变化
纯粹是附加的,这些工具不会修改应用程序状态或
行为。这种良性工具的例子包括监控代理,
分析器、覆盖率分析器和事件记录器。

According to Oracle:

Instrumentation is the addition of byte-codes to methods for the
purpose of gathering data to be utilized by tools. Since the changes
are purely additive, these tools do not modify application state or
behavior. Examples of such benign tools include monitoring agents,
profilers, coverage analyzers, and event loggers.

烂人 2025-01-01 17:50:51

Instrumentation 通常用于动态代码分析。

它与日志记录不同,因为检测通常由软件自动完成,而日志记录需要人类智能来插入日志记录代码。

来源

Instrumentation is usually used in dynamic code analysis.

It differs from logging as instrumentation is usually done automatically by software, while logging needs human intelligence to insert the logging code.

Source

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文