Measurement is not performed for fun but with some specific purpose. Of course what your mesure is dependent of this purpose.The Goal- Question- Metric approach (GQM) to process and metrics, first suggested by Basili and his colleagues, has proven to be a particularly effective approach to selecting and implementing metics.
The GQM approach provides a framework involving three steps:
For an example see Fig. 3.2 and Table 3.3. The GQM tree or table must be supplemented by one or more models that express the relationships among the metrics if these must be combined to answer the question (eg. coder productivity may be measured in terms of effort per line of code).
- List major goals of the development or maintenance project.
- Derive from each goal the question that must be answered to determine if the goals are being met.
- Decide what must be measured in order to be able to answer the queations adequately.
To aid in generating the goals, questions, and metrics, Basili and Rombach provides a series of templates:
Templates for goal definition
- Purpose: To (characterize, evaluate, predict, motivate, etc.) the (process, product, model, metric, etc.) in order to (understand, assess, manage, engineer, learn, improve, etc.) it. Example: To evaluate the maintenance process in order to improve it.
- Perspective: Examine the (cost, effectiveness, correctness, defects, changes, product measures, etc.) from the viewpoit of the (developer, manager, customer, etc.) Example: Examine the cost from the viewpoint of the manager.
- Environment: The environment consists of: process, people, problem factors, methods, tools, constraints, etc. Example: The maintenance staff are poorly motivated programmers who have limited access to tools.