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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Timothée Peignier
September 16, 2012
Programming
2
680
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
190
Et votre backoffice ?
tim
0
280
Mobile Web Performance
tim
1
330
Un site web mobile en Django
tim
1
450
Other Decks in Programming
See All in Programming
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
190
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
390
The free-lunch guide to idea circularity
hollycummins
0
330
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
170
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
270
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
130
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
410
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
160
Nostalgia Meets Technology: Super Mario with TypeScript
manfredsteyer
PRO
0
100
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
130
How to stabilize UI tests using XCTest
akkeylab
0
140
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
230
Featured
See All Featured
Accessibility Awareness
sabderemane
0
84
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
220
A Tale of Four Properties
chriscoyier
163
24k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
580
Agile that works and the tools we love
rasmusluckow
331
21k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
410
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
980
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)