perf(storage): Improve benchmarks and fix race condition
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@ -579,7 +580,7 @@ func (s *Store) getEndpointResultsByEndpointID(tx *sql.Tx, endpointID int64, pag
|
||||
WHERE endpoint_result_id IN (`
|
||||
index := 1
|
||||
for endpointResultID := range idResultMap {
|
||||
query += fmt.Sprintf("$%d,", index)
|
||||
query += "$" + strconv.Itoa(index) + ","
|
||||
args = append(args, endpointResultID)
|
||||
index++
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ var (
|
||||
Method: "GET",
|
||||
Body: "body",
|
||||
Interval: 30 * time.Second,
|
||||
Conditions: []*core.Condition{&firstCondition, &secondCondition, &thirdCondition},
|
||||
Conditions: []core.Condition{firstCondition, secondCondition, thirdCondition},
|
||||
Alerts: nil,
|
||||
NumberOfFailuresInARow: 0,
|
||||
NumberOfSuccessesInARow: 0,
|
||||
|
Reference in New Issue
Block a user