File tree Expand file tree Collapse file tree
apache_status/python_modules
blueeyes_service/python_modules
multi_interface/python_modules
mem_fragmentation/python_modules
tokyo_tyrant/python_modules Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import urllib2
88import traceback
99import re
10+ import copy
1011
1112# global to store state for "total accesses"
1213METRICS = {
1314 'time' : 0 ,
1415 'data' : {}
1516}
1617
17- LAST_METRICS = dict (METRICS )
18+ LAST_METRICS = copy . deepcopy (METRICS )
1819METRICS_CACHE_MAX = 5
1920
2021#Metric prefix
@@ -106,7 +107,7 @@ def get_metrics():
106107 traceback .print_exc ()
107108
108109
109- LAST_METRICS = dict (METRICS )
110+ LAST_METRICS = copy . deepcopy (METRICS )
110111 METRICS = {
111112 'time' : time .time (),
112113 'data' : metrics
Original file line number Diff line number Diff line change 3030import os
3131import re
3232import time
33+ import copy
3334
3435
3536PARAMS = {
4344 'time' : 0 ,
4445 'data' : {}
4546}
46- LAST_METRICS = dict (METRICS )
47+ LAST_METRICS = copy . deepcopy (METRICS )
4748METRICS_CACHE_TTL = 1
4849
4950
@@ -84,7 +85,7 @@ def get_metrics():
8485 metrics = {}
8586
8687 # update cache
87- LAST_METRICS = dict (METRICS )
88+ LAST_METRICS = copy . deepcopy (METRICS )
8889 METRICS = {
8990 'time' : time .time (),
9091 'data' : metrics
Original file line number Diff line number Diff line change 3131import socket
3232import string
3333import time
34-
34+ import copy
3535
3636NAME_PREFIX = 'mongodb_'
3737PARAMS = {
4242 'time' : 0 ,
4343 'data' : {}
4444}
45- LAST_METRICS = dict (METRICS )
45+ LAST_METRICS = copy . deepcopy (METRICS )
4646METRICS_CACHE_TTL = 3
4747
4848
@@ -85,7 +85,7 @@ def get_metrics():
8585 metrics = {}
8686
8787 # update cache
88- LAST_METRICS = dict (METRICS )
88+ LAST_METRICS = copy . deepcopy (METRICS )
8989 METRICS = {
9090 'time' : time .time (),
9191 'data' : metrics
Original file line number Diff line number Diff line change 2727
2828import os
2929import time
30-
30+ import copy
3131
3232NAME_PREFIX = 'conntrack_'
3333PARAMS = {
3737 'time' : 0 ,
3838 'data' : {}
3939}
40- LAST_METRICS = dict (METRICS )
40+ LAST_METRICS = copy . deepcopy (METRICS )
4141METRICS_CACHE_MAX = 5
4242
4343def create_desc (skel , prop ):
@@ -67,7 +67,7 @@ def get_metrics():
6767 metrics [values [0 ]] = 0
6868
6969 # update cache
70- LAST_METRICS = dict (METRICS )
70+ LAST_METRICS = copy . deepcopy (METRICS )
7171 METRICS = {
7272 'time' : time .time (),
7373 'data' : metrics
Original file line number Diff line number Diff line change 22import time
33import sys
44import os
5+ import copy
56
67PARAMS = {}
78
1112 'time' : 0 ,
1213 'data' : {}
1314}
14- LAST_METRICS = dict (METRICS )
15+ LAST_METRICS = copy . deepcopy (METRICS )
1516METRICS_CACHE_MAX = 5
1617
1718INTERFACES = []
@@ -153,7 +154,7 @@ def get_metrics():
153154 metrics [dev_name ] = re .split ("\s+" , a [1 ].lstrip ())
154155
155156 # update cache
156- LAST_METRICS = dict (METRICS )
157+ LAST_METRICS = copy . deepcopy (METRICS )
157158 METRICS = {
158159 'time' : time .time (),
159160 'data' : metrics
Original file line number Diff line number Diff line change 33import os
44import re
55import time
6+ import copy
67
78METRICS = {
89 'time' : 0 ,
2324 'rcu' : 10
2425}
2526
26- LAST_METRICS = dict (METRICS )
27+ LAST_METRICS = copy . deepcopy (METRICS )
2728METRICS_CACHE_MAX = 5
2829
2930
@@ -53,7 +54,7 @@ def get_metrics():
5354 metrics [parts [0 ]] = list (parts [1 :])
5455
5556 # update cache
56- LAST_METRICS = dict (METRICS )
57+ LAST_METRICS = copy . deepcopy (METRICS )
5758 METRICS = {
5859 'time' : time .time (),
5960 'data' : metrics
Original file line number Diff line number Diff line change 11import sys
22import re
33import time
4+ import copy
45
56PARAMS = {}
67
1516
1617buddyinfo_file = "/proc/buddyinfo"
1718
18- LAST_METRICS = dict (METRICS )
19+ LAST_METRICS = copy . deepcopy (METRICS )
1920METRICS_CACHE_MAX = 5
2021
2122stats_pos = {}
@@ -82,7 +83,7 @@ def get_metrics():
8283
8384 file .close
8485 # update cache
85- LAST_METRICS = dict (METRICS )
86+ LAST_METRICS = copy . deepcopy (METRICS )
8687 METRICS = {
8788 'time' : time .time (),
8889 'data' : values
Original file line number Diff line number Diff line change 11import sys
2- #import traceback
3- #import os
42import re
53import time
4+ import copy
65
76PARAMS = {}
87
1211 'time' : 0 ,
1312 'data' : {}
1413}
15- LAST_METRICS = dict (METRICS )
14+ LAST_METRICS = copy . deepcopy (METRICS )
1615METRICS_CACHE_MAX = 5
1716
1817###############################################################################
@@ -47,7 +46,7 @@ def get_metrics():
4746 metrics [parts [0 ]] = parts [1 ]
4847
4948 # update cache
50- LAST_METRICS = dict (METRICS )
49+ LAST_METRICS = copy . deepcopy (METRICS )
5150 METRICS = {
5251 'time' : time .time (),
5352 'data' : metrics
Original file line number Diff line number Diff line change 2727
2828import os
2929import time
30-
30+ import copy
3131
3232NAME_PREFIX = 'tokyo_tyrant_'
3333PARAMS = {
3737 'time' : 0 ,
3838 'data' : {}
3939}
40- LAST_METRICS = dict (METRICS )
40+ LAST_METRICS = copy . deepcopy (METRICS )
4141METRICS_CACHE_MAX = 1
4242
4343
@@ -61,7 +61,7 @@ def get_metrics():
6161 metrics [values [0 ]] = values [1 ]
6262
6363 # update cache
64- LAST_METRICS = dict (METRICS )
64+ LAST_METRICS = copy . deepcopy (METRICS )
6565 METRICS = {
6666 'time' : time .time (),
6767 'data' : metrics
Original file line number Diff line number Diff line change 2727
2828import os
2929import time
30-
30+ import copy
3131
3232NAME_PREFIX = 'varnish_'
3333PARAMS = {
3737 'time' : 0 ,
3838 'data' : {}
3939}
40- LAST_METRICS = dict (METRICS )
40+ LAST_METRICS = copy . deepcopy (METRICS )
4141METRICS_CACHE_MAX = 5
4242
4343def create_desc (skel , prop ):
@@ -67,7 +67,7 @@ def get_metrics():
6767 metrics [values [0 ]] = 0
6868
6969 # update cache
70- LAST_METRICS = dict (METRICS )
70+ LAST_METRICS = copy . deepcopy (METRICS )
7171 METRICS = {
7272 'time' : time .time (),
7373 'data' : metrics
You can’t perform that action at this time.
0 commit comments