diff --git a/camera-front/node/routers/file.js b/camera-front/node/routers/file.js index f7bfdbe23..ffecc86f6 100644 --- a/camera-front/node/routers/file.js +++ b/camera-front/node/routers/file.js @@ -108,7 +108,7 @@ router.get('/getTraceFile', function(req, res, next) { }); } let result = buffer.toString(); - let resList = result.split('---'); + let resList = result.split('------'); let traceData = JSON.parse(_.head(resList)); let cpuEventStrs = _.slice(resList, 1); let cpuEventsList = []; diff --git a/collector/pkg/component/consumer/exporter/cameraexporter/filewriter.go b/collector/pkg/component/consumer/exporter/cameraexporter/filewriter.go index bafd79de1..bd4ebfffb 100644 --- a/collector/pkg/component/consumer/exporter/cameraexporter/filewriter.go +++ b/collector/pkg/component/consumer/exporter/cameraexporter/filewriter.go @@ -4,15 +4,16 @@ import ( "encoding/base64" "encoding/json" "fmt" + "os" + "path" + "path/filepath" + "strconv" + "github.com/Kindling-project/kindling/collector/pkg/component" "github.com/Kindling-project/kindling/collector/pkg/filepathhelper" "github.com/Kindling-project/kindling/collector/pkg/model" "github.com/Kindling-project/kindling/collector/pkg/model/constlabels" "github.com/Kindling-project/kindling/collector/pkg/model/constnames" - "os" - "path" - "path/filepath" - "strconv" ) type fileWriter struct { @@ -136,7 +137,7 @@ func getFilesName(path string) ([]string, error) { return files, err } -const dividingLine = "\n---\n" +const dividingLine = "\n------\n" func (fw *fileWriter) writeCpuEvents(group *model.DataGroup) { traceTimestamp := group.Labels.GetIntValue(constlabels.Timestamp)