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
Mesurer (par)tout, tout le temps
Search
Timothée Peignier
September 16, 2012
Programming
2
650
Mesurer (par)tout, tout le temps
Timothée Peignier
September 16, 2012
Tweet
Share
More Decks by Timothée Peignier
See All by Timothée Peignier
Dr. Rubocop
tim
0
160
Et votre backoffice ?
tim
0
260
Mobile Web Performance
tim
1
310
Un site web mobile en Django
tim
1
420
Other Decks in Programming
See All in Programming
JetBrainsのAI機能の紹介 #jjug
yusuke
0
190
バイブコーディングの正体——AIエージェントはソフトウェア開発を変えるか?
stakaya
5
750
あまり知られていない MCP 仕様たち / MCP specifications that aren’t widely known
ktr_0731
0
220
0から始めるモジュラーモノリス-クリーンなモノリスを目指して
sushi0120
0
250
バイブスあるコーディングで ~PHP~ 便利ツールをつくるプラクティス
uzulla
1
320
抽象化という思考のツール - 理解と活用 - / Abstraction-as-a-Tool-for-Thinking
shin1x1
1
930
Streamlitで実現できるようになったこと、実現してくれたこと
ayumu_yamaguchi
2
270
一人でAIプロダクトを作るならAIにはもっと働いてもらいたい / I want AI to work harder
rkaga
4
370
Android 15以上でPDFのテキスト検索を爆速開発!
tonionagauzzi
0
190
AIのメモリー
watany
12
1.3k
QA x AIエコシステム段階構築作戦
osu
0
240
可変性を制する設計: 構造と振る舞いから考える概念モデリングとその実装
a_suenami
10
1.6k
Featured
See All Featured
Designing for Performance
lara
610
69k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Practical Orchestrator
shlominoach
190
11k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
The Cost Of JavaScript in 2023
addyosmani
51
8.7k
KATA
mclloyd
31
14k
How GitHub (no longer) Works
holman
314
140k
Music & Morning Musume
bryan
46
6.7k
The Pragmatic Product Professional
lauravandoore
36
6.8k
Making the Leap to Tech Lead
cromwellryan
134
9.5k
Statistics for Hackers
jakevdp
799
220k
Git: the NoSQL Database
bkeepers
PRO
431
65k
Transcript
Mesurer (par)tout, tout le temps
Nous écrivons du code.
Notre travail est de générer de la valeur.
Notre code est un sous-produit.
Notre code génère de la valeur quand il est exécuté,
pas quand nous l’écrivons.
Que fait notre code quand il s’exécute ?
Mesurer.
Notre code ne se comporte pas comme nous le pensons.
None
“Ce code ne peut pas échouer”
(et pourtant il échoue) “Ce code ne peut pas échouer”
“Ce code ne peut pas fonctionner”
(et pourtant il fonctionne) “Ce code ne peut pas fonctionner”
Cela affecte nos décisions.
def sort(obj_list): time.sleep(10) obj_list.sort() def sort(obj_list): obj_list.sort() Lequel est le
plus rapide ? ❶ ❷
def sleep(): # I’m poison pass
def sort(self): # I’m evil raise RuntimeError
Mesurez-le, vous le saurez.
Moins de confusion, de meilleures décisions.
Mesurer, continuellement, en production.
Et python dans tout ça ?
pip installwhisper carbon graphite-web statsd metrology
librato newrelic ( )
Gauges Counters Meters Histograms Timers
Gauges Il y a n workers actifs
statsd.gauge(“workers”, state.workers_count)
Gauges Counters Meters Histograms Timers
Counters Il y a n jobs en attente
counter = Metrology.counter('pending') counter.increment() counter.decrement()
Gauges Counters Meters Histograms Timers
Meters Il y a n requêtes/s
meter = Metrology.meter('requests') meter.mark()
Gauges Counters Meters Histograms Timers
Histograms La taille de la réponse
histogram = Metrology.histogram('response-sizes') histogram.update(len(response.content))
Gauges Counters Meters Histograms Timers
Timers Temps de réponse
timer = Metrology.timer('responses') with timer: make_response()
Collecter, Agréger, Monitorer.
Données historiques + Déploiements + Pannes + Comportement en charge
None
None
None
None
Votre vision de votre code sera plus proche de la
réalité.
Merci beaucoup ! @cyberdelia lanyrd.com/sxqqf (ne soyez pas timide, posez
votre question)