You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The statement that is then executed is as follows (corresponding to the name and address of the graph space):
python3 run.py stress run -scenario insert.InsertComment --args='-u 3 -d 3s' -s stress_test_0518 -a 172.18.0.8:9669
The test results returned are as follows:
Afterwards, open the relevant js file and CSV file in the output folder to see the problem.
Part of the output_InsertComment.csv file is as follows:
The main error is that each time the ngql statement is constructed, two double quotes are constructed in the double quotes describing the vertex’s attributes.
Subsequently, the generated InsertComment.js file was queried,Some of the code is as follows:
export function setup() {
// config csv file
pool.configCSV("target/data/test_data/social_network/dynamic/comment.csv", "|", false)
// config output file, save every query information
pool.configOutput("output/output_InsertComment.csv")
sleep(1)
}
export default function (data) {
let ngql = 'INSERT VERTEX Comment (creationDate, locationIP, browserUsed, content, length) VALUES '
let batches = []
let batchSize = 100
// batch size 100
for (let i = 0; i < batchSize; i++) {
let d = session.getData();
let values = []
let arr = [1,2,3,4,5]
arr.forEach(function(e){
let value = '"' + d[e] + '"'
values.push(value)
})
Afterwards, Try to change “ let value = '"' + d[e] + '"' “ to “ let value = “’” + d[e] + “’” “, Execute the statement:
scripts/k6 run output/InsertComment.js -u 3 -d 3s --summary-trend-stats "min,avg,med,max,p(90),p(95),p(99)" --summary-export output/result_InsertComment.json
The checks of k6's output is still 0.
The output_InsertComment.csv file was found to be as follows:
Found that only a single quote was output in the executed ngql statement, then tried successively with """ + d[e] + """, " \x22" + d[e] + "\x22" and so on, but the output csv file shows two double quotes. I would like to know what the problem is and how to solve it.
The text was updated successfully, but these errors were encountered:
Using nebula-bench to test “insert vertex” statement,The “InsertComment” class created in the “scenarios” folder is shown below:
class InsertComment(BaseScenario):
is_insert_scenario = True
nGQL = "INSERT VERTEX Comment (creationDate, locationIP, browserUsed, content, length) VALUES "
abstract = False
csv_path = "social_network/dynamic/comment.csv"
csv_index = [1, 2, 3, 4, 5]
The statement that is then executed is as follows (corresponding to the name and address of the graph space):
python3 run.py stress run -scenario insert.InsertComment --args='-u 3 -d 3s' -s stress_test_0518 -a 172.18.0.8:9669
The test results returned are as follows:
Afterwards, open the relevant js file and CSV file in the output folder to see the problem.
Part of the output_InsertComment.csv file is as follows:
The main error is that each time the ngql statement is constructed, two double quotes are constructed in the double quotes describing the vertex’s attributes.
Subsequently, the generated InsertComment.js file was queried,Some of the code is as follows:
export function setup() {
// config csv file
pool.configCSV("target/data/test_data/social_network/dynamic/comment.csv", "|", false)
// config output file, save every query information
pool.configOutput("output/output_InsertComment.csv")
sleep(1)
}
export default function (data) {
let ngql = 'INSERT VERTEX Comment (creationDate, locationIP, browserUsed, content, length) VALUES '
let batches = []
let batchSize = 100
// batch size 100
for (let i = 0; i < batchSize; i++) {
let d = session.getData();
let values = []
let arr = [1,2,3,4,5]
arr.forEach(function(e){
let value = '"' + d[e] + '"'
values.push(value)
})
}
ngql = ngql + batches.join(',')
let response = session.execute(ngql)
check(response, {
"IsSucceed": (r) => r.isSucceed() === true
});
// add trend
lantencyTrend.add(response.getLatency());
responseTrend.add(response.getResponseTime());
};
Afterwards, Try to change “ let value = '"' + d[e] + '"' “ to “ let value = “’” + d[e] + “’” “, Execute the statement:
scripts/k6 run output/InsertComment.js -u 3 -d 3s --summary-trend-stats "min,avg,med,max,p(90),p(95),p(99)" --summary-export output/result_InsertComment.json
The checks of k6's output is still 0.
The output_InsertComment.csv file was found to be as follows:
Found that only a single quote was output in the executed ngql statement, then tried successively with """ + d[e] + """, " \x22" + d[e] + "\x22" and so on, but the output csv file shows two double quotes. I would like to know what the problem is and how to solve it.
The text was updated successfully, but these errors were encountered: