Skip to content

Commit

Permalink
Change dividing line of profiling files from three dashes to six (#347)
Browse files Browse the repository at this point in the history
Signed-off-by: yiqianxu <yiqianxu@harmonycloud.cn>
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Co-authored-by: Daxin Wang <daxinwang@harmonycloud.cn>
  • Loading branch information
thousandxu and Daxin Wang authored Nov 2, 2022
1 parent f7e78f0 commit a26a606
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion camera-front/node/routers/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a26a606

Please sign in to comment.