In the context of [[computer programming]], '''instrumentation''' refers to the measure of a product's performance, to diagnose errors, and to write [[Tracing (software)|trace]] information.<ref>[http://pic.dhe.ibm.com/infocenter/rtrthelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.rational.testrt.doc%2Ftopics%2Fcinstruovw.html Source Code Instrumentation Overview at IBM website]</ref> Programmers implement instrumentation in the form of code [[Instruction (computer science)|instructions]] that monitor specific components in a system (for example, instructions may output logging information to appear on the screen). When an application contains instrumentation code, it can be managed by 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.
== Output ==
In programming, instrumentation means the ability of an application to incorporate:<ref>{{cite web|url=http://www.drdobbs.com/architecture-and-design/commenting-testing-and-instrumenting-cod/229300224|title=Commenting, Testing, and Instrumenting Code|date=January 3, 2011|accessdate=January 29, 2014}}</ref>
* [[Profiling (computer programming)|Profiling]]: – a means by whichmeasuring dynamic program behaviors can be measured during a training run with a representative input. This is useful for properties of a program that cannot be [[static program analysis|analyzed statically]] with sufficient precision, such as [[alias analysis]].
* Function timers.
* Performance counters – components that allow the tracking of the performance of the application.
* Logging major events.
* [[Computer data logging]] – components that allow the logging and tracking of major events in the execution of the application.