13 Commits

Author SHA1 Message Date
Jonathan Boulle
f1ed69e883 *: switch to line comments for copyright
Build tags are not compatible with block comments.
Also adds copyright header to a few places it was missing.
2015-01-26 09:53:30 -08:00
Xiang Li
c27c288bef etcdserver: update stats when become leader 2014-12-15 17:02:48 -08:00
Xiang Li
935f7128a9 etcdserver: move stats inferface to stats pkg 2014-12-11 22:14:05 -08:00
Yicheng Qin
aa50af1c69 *: clean log.Print
1. only log things by default that the operator of etcd may need to react to
2. put package name at the head of log lines
2014-10-30 18:15:53 -07:00
Jonathan Boulle
7a4d42166b *: add license header to all source files 2014-10-17 15:41:22 -07:00
Jonathan Boulle
da64e7509c etcdserver/stats: lock on leaderstats too 2014-10-17 00:11:25 -07:00
Jonathan Boulle
82023c591d etcdserver/stats: log any marshaling error 2014-10-16 23:05:48 -07:00
Jonathan Boulle
233e940410 etcdserver: copy stats instead of marshaling with lock 2014-10-16 23:05:48 -07:00
Jonathan Boulle
c28907ba95 etcdserver: fix race and improve stats interfaces 2014-10-16 23:05:48 -07:00
Yicheng Qin
7ef375efbd Merge pull request #1317 from unihorn/169
etcdserver: fix data race in leaderStats.Followers
2014-10-16 16:24:26 -07:00
Yicheng Qin
782d91f2d9 etcdserver: fix data race in leaderStats.Followers 2014-10-16 16:18:53 -07:00
Yicheng Qin
eb72bdc3d2 stats: fix data race when recording send result 2014-10-16 15:39:31 -07:00
Jonathan Boulle
8168fed825 etcdserver: add ServerStats and LeaderStats
This adds the remaining two stats endpoints: `/v2/stats/self`, for
various statistics on the EtcdServer, and `/v2/stats/leader`, for
statistics on a leader's followers.

By and large most of the stats code is copied across from 0.4.x, updated
where necessary to integrate with the new decoupling of raft from
transport.

This does not satisfactorily resolve the question of name vs ID. In the
old world, names were unique in the cluster and transmitted over the
wire, so they could be used safely in all statistics. In the new world,
a given EtcdServer only knows its own name, and it is instead IDs that
are communicated among the cluster members. Hence in most places here we
simply substitute a string-encoded ID in place of name, and only where
possible do we retain the actual given name of the EtcdServer.
2014-10-16 10:43:44 -07:00