~ubuntu-branches/ubuntu/trusty/haproxy/trusty-backports

« back to all changes in this revision

Viewing changes to include/proto/server.h

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2009-06-26 00:11:01 UTC
  • mfrom: (1.1.6 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090626001101-qo261ke2mjh3d8cn
* New Upstream Version (Closes: #534583).
* Add contrib directory in docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
  include/proto/server.h
3
3
  This file defines everything related to servers.
4
4
 
5
 
  Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
 
5
  Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
6
6
  
7
7
  This library is free software; you can redistribute it and/or
8
8
  modify it under the terms of the GNU Lesser General Public
30
30
#include <types/server.h>
31
31
 
32
32
#include <proto/queue.h>
 
33
#include <proto/freq_ctr.h>
33
34
 
34
35
int srv_downtime(struct server *s);
35
36
int srv_getinter(struct server *s);
36
37
 
 
38
/* increase the number of cumulated connections on the designated server */
 
39
static void inline srv_inc_sess_ctr(struct server *s)
 
40
{
 
41
        s->cum_sess++;
 
42
        update_freq_ctr(&s->sess_per_sec, 1);
 
43
        if (s->sess_per_sec.curr_ctr > s->sps_max)
 
44
                s->sps_max = s->sess_per_sec.curr_ctr;
 
45
}
 
46
 
37
47
#endif /* _PROTO_SERVER_H */
38
48
 
39
49
/*