sub startup {
....
$self->plugin('MojoX::JSON::XS');
}
Concurrency Level: 10
Time taken for tests: 41.232 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 36181000 bytes
HTML transferred: 36029000 bytes
Requests per second: 24.25 [#/sec] (mean)
Time per request: 412.317 [ms] (mean)
Time per request: 41.232 [ms] (mean, across all concurrent requests)
Transfer rate: 856.94 [Kbytes/sec] received
sub startup {
...
$self->renderer->add_handler( json => sub {
my (undef, $c, $output, $options) = @_;
$$output = $c->get('JSON')->encode($options->{json} || {});
});
}
Concurrency Level: 10
Time taken for tests: 41.249 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 36181000 bytes
HTML transferred: 36029000 bytes
Requests per second: 24.24 [#/sec] (mean)
Time per request: 412.490 [ms] (mean)
Time per request: 41.249 [ms] (mean, across all concurrent requests)
Transfer rate: 856.58 [Kbytes/sec] received