Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 2 KB

restApi.md

File metadata and controls

26 lines (18 loc) · 2 KB

REST API benchmark

This benchmark respresent a REST API application.

It contains 500 routes, 15,000 translations and return 100 PHP objects serialized in JSON.

An event is triggered to randomly define language and benchmark event dispatcher.

No database access is made, to not influence the results.

Features

Don't forget this features as to be coded in common repository.

  • A route with the url benchmark/rest. Is should be the first defined route. Example.
  • 500 other routes with the url /benchmark/test-route-x, defined after the first one. Example.
  • A controller called by the url benchmark/rest. Example.
    • Trigger an event to randomly define language. Example.
    • This event should randomly define language between fr_FR, en_GB and en (to use fallback system). Example.
    • Serialize the return of PhpBenchmarksRestData\Service\Service::getUsers() into json. Example.
    • Return this json in response body with Content-Type: application/json header. Example.
  • 5,000 translations by language (fr_FR, en_GB and en so 15,000 translations in total). Example.

Back to documentation index