Skip to content

Add some routes that return more data #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
drhuffman12 opened this issue Feb 13, 2018 · 7 comments
Closed

Add some routes that return more data #110

drhuffman12 opened this issue Feb 13, 2018 · 7 comments

Comments

@drhuffman12
Copy link

Some web frameworks seem to work better w/ more or less data packet sizes.

Please add some routes that return more data; possibly just plain text. e.g.:

  • existing routes [almost no data]
  • small routes [e.g.: N bytes]
  • medium routes [e.g.: 10 * N bytes]
  • large routes [e.g.: 100 * N bytes]
@waghanza
Copy link
Collaborator

sure, it could be a good idea.

I think we have to discuss about production-ready benchmarks -> using a database, caches ...

@OvermindDL1
Copy link
Collaborator

OvermindDL1 commented Feb 28, 2018

It shouldn't be a static set of bytes either (else most good frameworks will just kernel-switch the entire memory set to the pipe, which is not really a good test), rather it should duplicate and echo the data passed in or something.

EDIT: Maybe just a single route for those 3 that takes 2 parameters, one is the duplication count, the other is the string to duplicate the number of times.

@greenlaw110
Copy link
Contributor

@waghanza do we have plan to implement more testing? As the name suggest this is performance benchmakr for web-frameworks, however there are so many places that can be benchmarked for a web-framework, thing like complex routing, database read/write, JSON parsing, complex request with mutliple parameters, post request with form or JSON payload in body etc.

@waghanza
Copy link
Collaborator

waghanza commented Feb 14, 2020

@greenlaw110 #1728 is a better place to discuss about that.

However, I think that hard-coding a sleep can be useful (for each endpoint). It can mimic database calls (without adding complexity)

@OvermindDL1
Copy link
Collaborator

Sleep on the other hand will halt the thread while it sleeps, where accessing the database is async, so that's not quite accurate. Plus the granularity of sleep is ~15ms on average (OS depending) or slightly greater than 1ms on average in high resolution modes, which can also be a good bit slower than accessing a well tuned database.

@waghanza
Copy link
Collaborator

Sure @OvermindDL1, but what do you propose?

@OvermindDL1
Copy link
Collaborator

Most frameworks should have some method to async sleep, that is what should be used as it would accurately represent a database transaction. For those frameworks that don't have an async sleep then normal sleep can be used, of which that would also accurately represent a database transaction since if those frameworks don't have async then they have to halt for the database to respond back anyway. I'd imagine almost all except the very basic frameworks would have async though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants