use json-iterator/go instead encoding/json
This commit is contained in:
parent
da5dd683d6
commit
aff0dbfea1
|
@ -16,8 +16,11 @@ import (
|
|||
"github.com/didi/nightingale/v5/src/server/naming"
|
||||
|
||||
promstat "github.com/didi/nightingale/v5/src/server/stat"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
)
|
||||
|
||||
var json = jsoniter.ConfigCompatibleWithStandardLibrary
|
||||
|
||||
func New(version string, reloadFunc func()) *gin.Engine {
|
||||
gin.SetMode(config.C.RunMode)
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ package router
|
|||
import (
|
||||
"compress/gzip"
|
||||
"compress/zlib"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
|
|
@ -2,7 +2,6 @@ package router
|
|||
|
||||
import (
|
||||
"compress/gzip"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"strconv"
|
||||
|
@ -140,6 +139,7 @@ func (m *FalconMetric) ToProm() (*prompb.TimeSeries, string, error) {
|
|||
}
|
||||
|
||||
func falconPush(c *gin.Context) {
|
||||
|
||||
var bs []byte
|
||||
var err error
|
||||
var r *gzip.Reader
|
||||
|
|
|
@ -2,7 +2,6 @@ package router
|
|||
|
||||
import (
|
||||
"compress/gzip"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"strconv"
|
||||
|
|
Loading…
Reference in New Issue