monasca-thresh/thresh/src/test/java/monasca
Craig Bryant 46f2f5f3df Improve performance of Alarm Creation
The AlarmCreationBolt now caches AlarmDefinitions and Alarms for
quicker evaluation of incoming metrics. Incoming metrics end up in one
of these buckets:

1. Fits into an existing Alarm
2. Causes a new Alarm to be created
3. Already exists in an existing Alarm

All of these require the analysis of existing Alarms. I tried writing SQL
to do this analysis but it just wasn't fast enough so instead I added
the caching of the Alarm Definitions and Alarms.

The AlarmCreationBolt now needs to process Alarm deletion message so
that stream from the EventProcessingBolt had to be hooked up to the
AlarmCreationBolt.

The AlarmCreationBolt used to incorrectly handle
Alarm Definition Updated events.

Improved the queries in AlarmDAOImpl to be more efficient by using
fewer queries intsead of multiple queries per Alarm. However the
AlarmDAOImplTest now requires a real mysql instance since the h2
emulator doesn't understand "group_concat". Mark that test as
only run for target integration-test

Turn on tests for target integration-test

Previous code was not reusing Metrics from existing Alarms
all times it should have. Added test for this case

Changed info messages to debug to lessen normal logging.

Added more tests of existing and new functionality

Added some timing code for debug

Removed unused code

Added more debug logging code

Added reference to API doc for Alarm Definitions in README

Change-Id: Ied9841ecde7608b9eb1eb9c110b73b079ede71bc
2015-01-09 12:35:56 -07:00
..
thresh Improve performance of Alarm Creation 2015-01-09 12:35:56 -07:00