Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Medindo a Performance de Códigos PHP
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Jonata Weber
November 25, 2016
Technology
0
74
Medindo a Performance de Códigos PHP
Jonata Weber
November 25, 2016
Tweet
Share
More Decks by Jonata Weber
See All by Jonata Weber
PHPStan - Analisador Estático
jonataa
0
120
PHP Moderno
jonataa
0
110
TemDendê: Desenvolvimento PHP a Moda Baiana
jonataa
0
58
Programação Reativa com RxJS
jonataa
0
140
O que esperar de um profissional de TI
jonataa
0
42
A onda agora é função como serviço
jonataa
0
34
Programação Funcional com Acarajé e Dendê
jonataa
0
60
Curso de Programação Funcional com JavaScript
jonataa
0
180
5 motivos para você participar de eventos
jonataa
0
160
Other Decks in Technology
See All in Technology
CyberAgentの生成AI戦略 〜変わるものと変わらないもの〜
katayan
0
280
わからなくて良いなら、わからなきゃだめなの?
kotaoue
1
370
生成AIで速度と品質を両立する、QAエンジニア・開発者連携のAI協調型テストプロセス
shota_kusaba
0
260
Lambda Web AdapterでLambdaをWEBフレームワーク利用する
sahou909
0
180
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
2
13k
楽しく学ぼう!ネットワーク入門
shotashiratori
1
490
モジュラモノリス導入から4年間の総括:アーキテクチャと組織の相互作用について / Architecture and Organizational Interaction
nazonohito51
3
860
頼れる Agentic AI を支える Datadog のオブザーバビリティ / Powering Reliable Agentic AI with Datadog Observability
aoto
PRO
0
230
欠陥分析(ODC分析)における生成AIの活用プロセスと実践事例 / 20260320 Suguru Ishii & Naoki Yamakoshi & Mayu Yoshizawa
shift_evolve
PRO
0
190
中央集権型を脱却した話 分散型をやめて、連邦型にたどり着くまで
sansantech
PRO
1
120
VLAモデル構築のための AIロボット向け模倣学習キット
kmatsuiugo
0
290
It’s “Time” to use Temporal
sajikix
3
230
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
1
2k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
290
Music & Morning Musume
bryan
47
7.1k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
160
My Coaching Mixtape
mlcsv
0
80
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
The Spectacular Lies of Maps
axbom
PRO
1
630
WENDY [Excerpt]
tessaabrams
9
37k
From π to Pie charts
rasagy
0
150
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
250
Paper Plane
katiecoart
PRO
0
48k
Transcript
Medindo a Performance de Códigos PHP Por Jonata Weber
@JonataWeber
www.app2sales.com
None
Performance Computer performance is the amount of work accomplished by
a computer system.
Aspects of performance • Availability • Response Time • Processing
Speed • Latency • Bandwidth • Throughtput • Scalability
Pick any two Cheap Good Fast
Development vs Production
Tools
Faker
Profile Before Optimizing
$then = microtime(); myFunc(); $now = microtime(); echo sprintf("Elapsed: %f",
$now - $then); There's a better way, right? :)
Apache Benchmarking $ ab -n 100 -c 10 http://localhost:8000
HTTP Benchmarking $ wrk -t12 -c400 -d30s http://localhost:8000
Testing High Availability
Load testing tool
None
Profiling
None
Install the xdebug $ pecl install xdebug
Starting the Profiler (php.ini) xdebug.profiler_enable=1 xdebug.profiler_output_dir xdebug.profiler_enable_trigger=1 More informations: https://xdebug.org/docs/profiler
Profiler Viewer
Profiler Viewer (in the browser)
Flame Graphs
XHProf: A Hierarchical Profiler for PHP
None
None
None
None
Demo
Problemas comuns
Problemas comuns • Arquitetura • Workload
Arquitetura • Sem cache; • Hardware mal dimensionado; • Aplicação
single thread; • Latência de rede não prevista.
Workload • Mais usuários que o esperado; • Cache mal
planejado.
Otimização precoce, fazer ou não fazer, eis a questão.
YAGNI You Aren't Gonna Need It
Mas, as vezes é preciso!
Make work. Make right. Make fast.
O que não pode ser medido não pode ser melhorado.
Esteja pronto, sempre!
None
Obrigado! @JonataWeber
Referências https://speakerdeck.com/tarsisazevedo/performance-analysis-101 http://wiki.c2.com/?PrematureOptimization http://wiki.c2.com/?ProfileBeforeOptimizing http://wiki.c2.com/?MakeItWorkMakeItRightMakeItFast