Skip to content

Instantly share code, notes, and snippets.

@johnwards
Created May 18, 2011 14:09
Show Gist options
  • Save johnwards/978638 to your computer and use it in GitHub Desktop.
Save johnwards/978638 to your computer and use it in GitHub Desktop.
Form Bench
<?php
namespace FoodRisc\MainBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
class AccountRegisterType extends AbstractType
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('account', new AccountType())
->add('researcher', new ResearcherType())
;
}
public function getIdentifier()
{
return 'account_register';
}
}
<?php
namespace FoodRisc\MainBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
class AccountType extends AbstractType
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('organizationName')
->add('subdomain')
->add('address1')
->add('address2')
->add('address2')
->add('town')
->add('postcode')
->add('country', 'country')
->add('telephone')
->add('language', 'language')
->add('timeZone', 'timezone')
->add('logo')
;
}
public function getDefaultOptions(array $options)
{
return array(
'data_class' => 'Model\Account',
);
}
public function getIdentifier()
{
return 'account';
}
}
<?php
namespace FoodRisc\MainBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
class ResearcherType extends AbstractType
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('firstName')
->add('lastName')
->add('email')
;
}
public function getDefaultOptions(array $options)
{
return array(
'data_class' => 'Model\Researcher',
);
}
public function getIdentifier()
{
return 'researcher';
}
}
john-wardss-macbook-pro:main johnwards$ ab -n50 -c3 http://foodrisc.john.dev/account/register
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking foodrisc.john.dev (be patient).....done
Server Software: Apache/2.2.17
Server Hostname: foodrisc.john.dev
Server Port: 80
Document Path: /account/register
Document Length: 803 bytes
Concurrency Level: 3
Time taken for tests: 4.047 seconds
Complete requests: 50
Failed requests: 0
Write errors: 0
Total transferred: 57300 bytes
HTML transferred: 40150 bytes
Requests per second: 12.35 [#/sec] (mean)
Time per request: 242.825 [ms] (mean)
Time per request: 80.942 [ms] (mean, across all concurrent requests)
Transfer rate: 13.83 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.3 0 2
Processing: 143 240 77.4 235 559
Waiting: 143 239 77.3 235 559
Total: 143 241 77.4 235 559
Percentage of the requests served within a certain time (ms)
50% 235
66% 244
75% 253
80% 268
90% 327
95% 413
98% 559
99% 559
100% 559 (longest request)
john-wardss-macbook-pro:main johnwards$ ab -n50 -c3 http://foodrisc.john.dev/account/register
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking foodrisc.john.dev (be patient).....done
Server Software: Apache/2.2.17
Server Hostname: foodrisc.john.dev
Server Port: 80
Document Path: /account/register
Document Length: 803 bytes
Concurrency Level: 3
Time taken for tests: 0.762 seconds
Complete requests: 50
Failed requests: 0
Write errors: 0
Total transferred: 57300 bytes
HTML transferred: 40150 bytes
Requests per second: 65.63 [#/sec] (mean)
Time per request: 45.712 [ms] (mean)
Time per request: 15.237 [ms] (mean, across all concurrent requests)
Transfer rate: 73.45 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.4 0 3
Processing: 28 45 17.7 38 100
Waiting: 28 45 17.4 38 100
Total: 28 45 17.7 39 100
Percentage of the requests served within a certain time (ms)
50% 39
66% 44
75% 54
80% 63
90% 74
95% 75
98% 100
99% 100
100% 100 (longest request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment