Task #5467
Refactor TestResult Storing
| Status: | Needs Feedback | Start date: | ||
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Martin Ficzel | % Done: | 0% |
|
| Category: | Backend | |||
| Target version: | - | |||
| Votes: | 0 |
Description
The test results should be stored in the db only when changes to the result or the value occur. This will reduce the amount of testresults, will help keeping the system performant on the long run and will keep the log focused on state changes.
Additionally the result storing with values and subresults is done with a weird associative-array syntax. We should use a clear separation of message , values to insert and submessages with subvalues. Therefor an tx_caretaker_testResultMessage object is introduced which will take a string (plain, LLL or plain with {LLL}Parts) and the values to insert.
So the interface will change from:
/**
* Create a new testresult with current timestamp
*
* @param integer $status
* @param float $value
* @param string $message
* @return tx_caretaker_TestResult
*/
static public function create($status=TX_CARETAKER_STATE_UNDEFINED, $value=0, $message='' , $info_array=false ){
to:
/**
* Create a new testresult with current timestamp
*
* @param integer $status
* @param float $value
* @param tx_caretaker_testResultMessage $message Objects which contain strings and values to insert
* @param array $submessages of tx_caretaker_testResultMessage Objects which contain strings and values to insert
* @return tx_caretaker_TestResult
*/
static public function create($status=TX_CARETAKER_STATE_UNDEFINED, $value=0, tx_caretaker_testResultMessage $message, array $submessages)
History
Updated by Martin Ficzel over 3 years ago
- Tracker changed from Bug to Task
Updated by Thomas Hempel over 2 years ago
- Category set to Backend
- Status changed from New to Needs Feedback
- Assignee set to Martin Ficzel
I think has been done already. Please close and/or update the status.