Skip to content

Christopher James Willcock

Enjoy Kaizen

Tag: Testing

mf2bench – Parse all the things (with all the parsers)

My Microformats2 parser passed all the tests a short while ago. After that milestone, I was wondering if it’s fast. That needs some context because fast compared to what? All the other Microformats2 parsers. Have they been measured? The answer to that one is: not before now as far as I can tell.

I took a little time to make mf2bench, a benchmarking tool that compares the performance of all (is it all?) the Microformats2 parsers out there. My work on the php-extension, mf2, came in second place in terms of speed, behind the Microformats2-parser for Go. I’m pretty happy with this, because I have been concentrated on coding to pass tests, to demonstrate that the parser meets the living specifications at microformats.org. Making it run fast, or as fast as is fun to make it, is still a little bit away.

I’ll next get mf2bench to provide some measure of what the parse from each parser is for the various samples. That will be neat.

 

========== UPDATE ==========

The above screenshot uses the default of three (3) parses per parser. It was captured for the sake of taking a picture, rather than of comparison between parsers, etc. Here is the same thing, with one hundred (100) parses per parser.

Versions of each parser tested:

Parser Version
ruby/microformats-ruby 4.1.0
python/mf2py 1.1.2
php/php-mf2 0.4.6
php/php-mf2 (w/ Masterminds\HTML5) 0.4.6 (2.5.0)
php-ext/mf2 unreleased
node/microformats-parser 2.0.1
go/microformats 0.1.26
perl/microformats2 0.5
elixir/microformats2 0.2.1
haskell/microformats2-parser 1.0.1.9

https://cjwillcock.ca/2019/02/10/1004/

https://cjwillcock.ca/2019/02/10/972/

https://cjwillcock.ca/2019/01/28/822/

My microformats2 parser has reached a milestone. All of the mf-test-suite microformats2 tests now pass.

138 commits, 107 passing tests – source

I’ll complete the current mf-test-suite tests before moving on to expanding on those tests alongside the parser. Next up is backcompat parsing.

https://cjwillcock.ca/2019/01/14/753/

Now at thirty (30) thirty-one (31) passing tests for my microformats parser.Total includes twenty-four (24) twenty-five (25) core tests and six (6) from the microformats-test-suite.

https://cjwillcock.ca/2019/01/13/748/

My Microformats parser now has fifteen (15) passing tests, parses rels & rel-urls from the web, from local disk (via URI), and from code string.

https://cjwillcock.ca/2019/01/12/745/

Progress on WordPress Theme: Pancakes

I’m still working away on my WordPress Theme, Pancakes. I’m doing some work now in a different part of the stack than the WordPress theme (still pancakes 😛 ). More on this soon.

https://cjwillcock.ca/2018/12/20/710/

Reply to test post.

https://cjwillcock.ca/2018/12/20/708/

Test post.

https://cjwillcock.ca/2018/12/16/696/

webmention from 2016-indieweb.

https://cjwillcock.ca/2018/12/16/694/

wp-webmention.

https://cjwillcock.ca/2018/12/16/692/

Webmentioning again, but this time the ‘Semantic Linkbacks’ plugin is activated on the receiver.

https://cjwillcock.ca/2018/12/16/689/

Webmentioning is taking quite some time.

https://cjwillcock.ca/2018/12/16/687/

One more webmention test.

https://cjwillcock.ca/2018/12/16/685/

Another webmention for debugging.

https://cjwillcock.ca/2018/12/16/683/

Another webmention test with some debugging.