Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change dividing line of profiling files from three dashes to six #347

Merged
merged 2 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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