From a682cdb44d2e14ba51b90d21daa7267c943489d1 Mon Sep 17 00:00:00 2001 From: yiqianxu Date: Wed, 2 Nov 2022 14:29:33 +0800 Subject: [PATCH 1/2] add profile splice flag Signed-off-by: yiqianxu --- camera-front/node/routers/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = []; From 3e576231737f231814d8cbfccc7c385a304adcbf Mon Sep 17 00:00:00 2001 From: Daxin Wang Date: Wed, 2 Nov 2022 14:34:05 +0800 Subject: [PATCH 2/2] change file dividing line from three dashes to six Signed-off-by: Daxin Wang --- .../consumer/exporter/cameraexporter/filewriter.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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)