Measuring open road seventy-seven: Performance Testing blueprint js

 


// define global null = Editor
var Editor = null;

// initialization function ace_editor
function ace_editor () {
var = ace.edit Editor ( "Editor"); // initialize the object, "editor" is the front page of ID
/ / set style and language (more style and language, go to the appropriate directory on github view)
//editor.setTheme("ace/theme/clouds "); // editing interface themes - cloud edit topics
editor.setTheme ( "ace / theme / monokai") ; // theme editing interface - dark theme
editor.getSession () setMode ( "ace / mode / python");. // set the programming language
return editor;
}

// start point pressure when the measurement trigger
function Start () {
var {Data =
'code': editor.getValue (), the code (aceedter) // taken on page
'host':. ( '# host') $ val (), // take Host
'User': $ ( 'User #') Val (),.// access User
'Rate':. $ ( '# Rate') Val (), // fetch requests per second (QPS)
'time': $ ( '# time') val () // time to take pressure measurements.
}
var = Host URL + "/ Performance / API / V1 / Start";
HTTP (URL, Data, 'the POST',
function ( the Data) {
console.log (the Data)
var the above mentioned id = the Data [ 'the Data'] [ 'the above mentioned id']
Alert ( "You have successfully created performance testing task ID [" + id + "] , Please do not resubmit!");
}, function (Data) {
the console.log (Data)
})
}

// entry function
$ (function () {
Editor ace_editor = () // default initialization ace_editor content
$ ( '# send'). click (start) / / click the start pressure measurement trigger
})

Guess you like

Origin www.cnblogs.com/zhongyehai/p/11286053.html