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
610
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
140
Et votre backoffice ?
tim
0
260
Mobile Web Performance
tim
1
300
Un site web mobile en Django
tim
1
420
Other Decks in Programming
See All in Programming
functionalなアプローチで動的要素を排除する
ryopeko
1
1.2k
令和7年版 あなたが使ってよいフロントエンド機能とは
mugi_uno
12
6.1k
Amazon Bedrock Multi Agentsを試してきた
tm2
1
270
AWS Organizations で実現する、 マルチ AWS アカウントのルートユーザー管理からの脱却
atpons
0
110
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1.2k
Immutable ActiveRecord
megane42
0
130
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
350
Pulsar2 を雰囲気で使ってみよう
anoken
0
200
動作確認やテストで漏れがちな観点3選
starfish719
6
950
TokyoR116_BeginnersSession1_環境構築
kotatyamtema
0
100
【PHP】破壊的バージョンアップと戦った話〜決断と説得
satoshi256kbyte
0
120
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2.1k
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
YesSQL, Process and Tooling at Scale
rocio
171
14k
The Language of Interfaces
destraynor
156
24k
Mobile First: as difficult as doing things right
swwweet
223
9.3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
9
1.3k
Into the Great Unknown - MozCon
thekraken
34
1.6k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
The Pragmatic Product Professional
lauravandoore
32
6.4k
A Modern Web Designer's Workflow
chriscoyier
693
190k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
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)