1
# Twisted, the Framework of Your Internet
2
# Copyright (C) 2001 Matthew W. Lefkowitz
4
# This library is free software; you can redistribute it and/or
5
# modify it under the terms of version 2.1 of the GNU Lesser General Public
6
# License as published by the Free Software Foundation.
8
# This library is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
# Lesser General Public License for more details.
13
# You should have received a copy of the GNU Lesser General Public
14
# License along with this library; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
from twisted.internet import tcp, main
26
value = int(time.time() * random.random())
29
c = client.MetricsClientComponent(7, "localhost", 8787)
30
c.doLogin("localMachine", "pass")
32
c.createStateVariable("state", getTestValue, 10)
33
c.createCounterVariable("counter1", 3)
34
c.createCounterVariable("counter2", 4)
35
c.createCounterVariable("counter3", 5)
43
r = random.random() * 40
45
c.incrementCounterVariable("counter1")
46
c.incrementCounterVariable("counter1")
47
c.incrementCounterVariable("counter1")
48
c.incrementCounterVariable("counter1")
49
c.incrementCounterVariable("counter1")
50
c.incrementCounterVariable("counter1")
51
c.incrementCounterVariable("counter1")
52
c.incrementCounterVariable("counter1")
53
c.incrementCounterVariable("counter1")
54
c.incrementCounterVariable("counter1")
55
c.incrementCounterVariable("counter1")
56
c.incrementCounterVariable("counter1")
57
c.incrementCounterVariable("counter1")
58
c.incrementCounterVariable("counter1")
59
c.incrementCounterVariable("counter1")
61
r = random.random() * 40
63
c.incrementCounterVariable("counter2")
65
r = random.random() * 40
67
c.incrementCounterVariable("counter3")