需要足够长的&用于性能测试的复杂 Markdown 文档
我正在寻找一个又长又复杂的 Markdown 文档,我可以用它来测试不同 Markdown 实现的性能——作为简单文档的迭代基准测试的替代方案。
我想我也许可以浏览 Stack Overflow 并找到一些东西,但总的来说,我找到的所有内容都写得很简单;到目前为止,我在谷歌上还没有找到任何有用的东西。
是否有一个现有文档展示了大部分或全部 Markdown 语法,也许只是为了这样的测试而编写的?
I'm looking for a long and complex Markdown document that I can use to test performance of different markdown implementations -- as an alternative to iterative benchmarking of a simple document.
I thought I might be able to browse around Stack Overflow and find something, but by and large everything I find is pretty simply written; and so far I'm not finding anything useful on Google.
Is there an existing document that showcases most or all Markdown syntax, perhaps written for just such a test?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您是否看过/使用过John Gruber 的测试套件?
Have you looked at/used John Gruber's test suite?
尝试一下这个。这是 John Gruber 的 Markdown 语法 页面的源 Markdown。
请注意,其中还有一些 HTML。
事实上,如果您将
.text
附加到 John Gruber 网站 上,几乎所有页面都会给您降价。网址。Try this out. It's the source markdown of John Gruber's Markdown Syntax page.
Be aware that there is some HTML in there as well.
In fact, nearly all pages on John Gruber's site give you markdown if you append
.text
to the URL.当 Commonmark 退出隐身模式时,Markdown 测试套件死掉后(从而浪费了大量的开放资源)源工作时间...),我在 https://github.com/cirosantilli/commonmark-implementation-compare
速度测试很幼稚,但给出了一个想法:
可能最大的缺陷是每个测试的输入都是从标准输入馈送的,因此调用解释器每次都会承受很大的开销。
原始答案
一种可能是使用 Markdown 测试套件:https://github。 com/karlcow/markdown-testsuite
执行
./cat-all.py
,然后在all.tmp.md
上运行测试目前包含 103 个测试,并且已经支持许多 Markdown 引擎。
已经针对各个测试的总时间(也是一个有意义的参数)完成了简单的基准测试,并且针对
cat-all.py
的输出实现它非常容易。After Markdown Test Suite died when Commonmark came out of stealth mode (thus wasting large amounts of open source work time...), I forked the multi-implementation comparison part (mostly written by yours truly) at https://github.com/cirosantilli/commonmark-implementation-compare
The speed testing is naive, but gives an idea:
Likely the greatest flaw is that each tested input is fed from stdin, so interpreters are called each time, and suffer a large overhead.
Original answer
A possibility is using the Markdown Test Suite: https://github.com/karlcow/markdown-testsuite
Do
./cat-all.py
and then run your tests onall.tmp.md
It currently contains 103 tests, and already supports many markdown engines.
Simple benchmarks are already done for the total time of individual tests (also a meaningful parameter), and it would be really easy to implement it for the output of
cat-all.py
.