Refactored choose metric.

Can't create compound metric if the configuration is empty.

signed-off-by: Guilherme Rojas V. de Lima <guilhermehrojas@gmail.com>