Skip to content

APIs design issues for performance testing #6

@medz

Description

@medz

Performance testing APIs are not designed rigorously, which can easily lead to unfair treatment by many frameworks.

I found the following problems:

  1. What the / route returns is actually a Map or content waiting to be json encoded. Many frameworks here support it and use json.encode
  2. /echo reads it from the body as JSON content. Here you need to use the json.decode function
  3. /json_obj This is where the JSON performance routing should really be verified

I ask this question because Dart's own JSON encoding/decoding is notoriously inefficient, and while there are alternatives in Dart, they are not commonly used.

And I found that only one of the reports of this performance test is for JSON data, but it is unfair to require all Dart frameworks to use json.encode and json.decode.

I have a few suggestions as follows:

  1. /constant - used to test the matching performance of hard-coded routes
  2. /text - used to test the processing performance of plain text
  3. /json/encode - used to test JSON encoding performance
  4. /json/decode - used to test JSON decoding performance
  5. /form-data - used to test FormData decoding performance
  6. /dynamic-route/<param> - used to test dynamic route matching performance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions