mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
added very slow performance test
This commit is contained in:
parent
95255984ad
commit
11b6aa2105
3698
test/performance.big.testfile.md
Normal file
3698
test/performance.big.testfile.md
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -30,6 +30,7 @@ var globals = {
|
||||||
|
|
||||||
function runTests () {
|
function runTests () {
|
||||||
var testMDFile = fs.readFileSync('test/performance.testfile.md', 'utf8');
|
var testMDFile = fs.readFileSync('test/performance.testfile.md', 'utf8');
|
||||||
|
var testMDFileBig = fs.readFileSync('test/performance.big.testfile.md', 'utf8');
|
||||||
new performance.Suite('Basic')
|
new performance.Suite('Basic')
|
||||||
.setOption('cycles', 50)
|
.setOption('cycles', 50)
|
||||||
.add('Simple "Hello World"', function () {
|
.add('Simple "Hello World"', function () {
|
||||||
|
@ -42,6 +43,14 @@ function runTests () {
|
||||||
test: function (mdText) {
|
test: function (mdText) {
|
||||||
converter.makeHtml(mdText);
|
converter.makeHtml(mdText);
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.add('performance.big.testfile.md', {
|
||||||
|
prepare: function () {
|
||||||
|
return testMDFileBig;
|
||||||
|
},
|
||||||
|
test: function (mdText) {
|
||||||
|
converter.makeHtml(mdText);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
new performance.Suite('subParsers')
|
new performance.Suite('subParsers')
|
||||||
.setOption('cycles', 20)
|
.setOption('cycles', 20)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user