Instrumented? What is a good explanation/definition of the word. (English: Tech Jargon)

What is a good explanation/definition of the word Instrumented?

as in "Good code needs to be instrumented..."

I did a brief web search, but the few places it pops up seem to also be full of jargon, so I'm still confused.

Is it a real word, is another word better, is it really related to Java programming, or other programming languages?


Wikipedia has a page on instrumentation:

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.

...

In programming, instrumentation means the ability of an application to incorporate:

  • Code tracing - receiving informative messages about the execution of an application at run time.
  • Debugging and (structured) exception handling - tracking down and fixing programming errors in an application under development.
  • Profiling (computer programming) - a means by which dynamic program behaviors can be measured during a training run with a representative input. This is useful for properties of a program which cannot be analyzed statically with sufficient precision, such as alias analysis.
  • Performance counters - components that allow the tracking of the performance of the application.
  • Computer data logging - components that allow the logging and tracking of major events in the execution of the application.

Instrumented means, basically, monitored with reference to the context shown above.


Daniel answered the programming side of things really well. To answer the other half of your question about whether it is a "real" word:

It is not strictly a programming word. Long before being used for programming it was used in other engineering disciplines. It meant literally attaching instruments (gauges, meters, etc.) to something to measure behavior or performance. Consider these excerpts from a NGram search:

"To date five modern submarines and three full-scale models have been instrumented in this manner." (talking about attaching gauges to the vessels to measure waterproofing) - 1955

One blade of each stiffness was instrumented to measure bending at nine spanwise stations - 1953

So the programming usage comes by way of an analogy. How do you measure the performance of software? You can't attach physical instruments to it, but you can use the things described in Daniel's link to look under the hood.