mirror of
https://github.com/emmett-framework/granian.git
synced 2025-08-04 17:08:02 +00:00
Improve CLI params description
This commit is contained in:
parent
cd7cb382b7
commit
e4aa8c37d4
2 changed files with 13 additions and 11 deletions
15
README.md
15
README.md
|
@ -90,11 +90,11 @@ Options:
|
|||
GRANIAN_WEBSOCKETS; default: (enabled)]
|
||||
--workers INTEGER RANGE Number of worker processes [env var:
|
||||
GRANIAN_WORKERS; default: 1; x>=1]
|
||||
--threads INTEGER RANGE Number of threads [env var:
|
||||
--threads INTEGER RANGE Number of threads (per worker) [env var:
|
||||
GRANIAN_THREADS; default: 1; x>=1]
|
||||
--blocking-threads INTEGER RANGE
|
||||
Number of blocking threads [env var:
|
||||
GRANIAN_BLOCKING_THREADS; x>=1]
|
||||
Number of blocking threads (per worker)
|
||||
[env var: GRANIAN_BLOCKING_THREADS; x>=1]
|
||||
--threading-mode [runtime|workers]
|
||||
Threading mode to use [env var:
|
||||
GRANIAN_THREADING_MODE; default: (workers)]
|
||||
|
@ -103,11 +103,12 @@ Options:
|
|||
--opt / --no-opt Enable loop optimizations [env var:
|
||||
GRANIAN_LOOP_OPT; default: (disabled)]
|
||||
--backlog INTEGER RANGE Maximum number of connections to hold in
|
||||
backlog [env var: GRANIAN_BACKLOG; default:
|
||||
1024; x>=128]
|
||||
backlog (globally) [env var:
|
||||
GRANIAN_BACKLOG; default: 1024; x>=128]
|
||||
--backpressure INTEGER RANGE Maximum number of requests to process
|
||||
concurrently [env var:
|
||||
GRANIAN_BACKPRESSURE; x>=1]
|
||||
concurrently (per worker) [env var:
|
||||
GRANIAN_BACKPRESSURE; default:
|
||||
(backlog/workers); x>=1]
|
||||
--http1-buffer-size INTEGER RANGE
|
||||
Set the maximum buffer size for HTTP/1
|
||||
connections [env var:
|
||||
|
|
|
@ -64,11 +64,11 @@ def option(*param_decls: str, cls: Optional[Type[click.Option]] = None, **attrs:
|
|||
@option('--http', type=EnumType(HTTPModes), default=HTTPModes.auto, help='HTTP version')
|
||||
@option('--ws/--no-ws', 'websockets', default=True, help='Enable websockets handling')
|
||||
@option('--workers', type=click.IntRange(1), default=1, help='Number of worker processes')
|
||||
@option('--threads', type=click.IntRange(1), default=1, help='Number of threads')
|
||||
@option('--threads', type=click.IntRange(1), default=1, help='Number of threads (per worker)')
|
||||
@option(
|
||||
'--blocking-threads',
|
||||
type=click.IntRange(1),
|
||||
help='Number of blocking threads',
|
||||
help='Number of blocking threads (per worker)',
|
||||
)
|
||||
@option(
|
||||
'--threading-mode',
|
||||
|
@ -82,12 +82,13 @@ def option(*param_decls: str, cls: Optional[Type[click.Option]] = None, **attrs:
|
|||
'--backlog',
|
||||
type=click.IntRange(128),
|
||||
default=1024,
|
||||
help='Maximum number of connections to hold in backlog',
|
||||
help='Maximum number of connections to hold in backlog (globally)',
|
||||
)
|
||||
@option(
|
||||
'--backpressure',
|
||||
type=click.IntRange(1),
|
||||
help='Maximum number of requests to process concurrently',
|
||||
show_default='backlog/workers',
|
||||
help='Maximum number of requests to process concurrently (per worker)',
|
||||
)
|
||||
@option(
|
||||
'--http1-buffer-size',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue