[wp-trac] [WordPress Trac] #49634: Performance Benchmarks for REST API

WordPress Trac noreply at wordpress.org
Fri Mar 13 20:32:00 UTC 2020


#49634: Performance Benchmarks for REST API
-----------------------------+------------------------------
 Reporter:  mnelson4         |       Owner:  (none)
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  REST API         |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  dev-feedback     |     Focuses:  performance
-----------------------------+------------------------------

Comment (by mnelson4):

 I asked @youknowriad in Slack about how they're computing Gutenberg's
 performance, and he pointed me to
 https://github.com/WordPress/gutenberg/blob/master/packages/e2e-
 tests/specs/performance/performance.test.js.
 The gist of it is this: they use Puppeteer and just track how long things
 take themselves. No magic build tool or anything.

 I also asked a wider web developer community on Reddit and have gotten
 crickets so far:
 https://www.reddit.com/r/webdev/comments/fhs392/how_to_add_performance_benchmarks_like_automated/

 I had hoped to find a tool that would do something like:

 * set a universal unit that indicates performance regardless of the
 current system; Eg "1 foobar = time it takes for
 `for($i=0;$i<1000;$i++){}` to execute on your current system
 * let you define tests to benchmark, their times would be listed in
 "foobars"
 * the results wouldn't be so much "pass" or "fail" but more a range
 between "crazy fast" and "very poor"
 * could maybe be combined with a CI service like Travis or even more
 standardized results

 But so far, no luck.

 Right now, I'm leaning towards creating some PHPUnit tests take to
 execute. If anyone else thinks the idea of setting a universal unit
 ("foobar"), I'd like to try it.
 We'd probably print the results to the console.

 I'd appreciate feedback on these thoughts.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49634#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list