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
660
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
170
Et votre backoffice ?
tim
0
260
Mobile Web Performance
tim
1
310
Un site web mobile en Django
tim
1
430
Other Decks in Programming
See All in Programming
AIのバカさ加減に怒る前にやっておくこと
blueeventhorizon
0
120
EMこそClaude Codeでコード調査しよう
shibayu36
0
490
퇴근 후 1억이 거래되는 서비스 만들기 | 내가 AI를 사용하는 방법
maryang
1
130
Register is more than clipboard
satorunooshie
1
150
CSC305 Lecture 11
javiergs
PRO
0
310
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
250
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
410
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
610
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
460
Node-REDのノードの開発・活用事例とコミュニティとの関わり(Node-RED Con Nagoya 2025)
404background
0
110
Leading Effective Engineering Teams in the AI Era
addyosmani
7
670
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
260
Featured
See All Featured
Building Applications with DynamoDB
mza
96
6.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Mobile First: as difficult as doing things right
swwweet
225
10k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
[RailsConf 2023] Rails as a piece of cake
palkan
57
6k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
900
It's Worth the Effort
3n
187
28k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
A Tale of Four Properties
chriscoyier
161
23k
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)