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
720
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Mesurer (par)tout, tout le temps
Timothée Peignier
September 16, 2012
More Decks by Timothée Peignier
See All by Timothée Peignier
Dr. Rubocop
tim
0
210
Et votre backoffice ?
tim
0
300
Mobile Web Performance
tim
1
340
Un site web mobile en Django
tim
1
470
Other Decks in Programming
See All in Programming
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
500
Hono + Inertia + React で LP を構築した話
oukayuka
2
160
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
490
ALB ログから Trace を気合で繋げる技術
fohte
5
520
メールのエイリアス機能を履き違えない
isshinfunada
0
250
Press start. Python's next generation.
willingc
PRO
3
130
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
180
Go 1.27 における memory allocation の高速化
andpad
0
320
Android CLI
fornewid
0
240
「人を評価する AI」の設計と実装
ryoyanara
0
240
React本体のコードリーディング
high_g_engineer
1
160
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
240
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
400
The Cult of Friendly URLs
andyhume
79
7k
It's Worth the Effort
3n
188
29k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
My Coaching Mixtape
mlcsv
0
280
Writing Fast Ruby
sferik
630
63k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
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)