Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apachedex
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
apachedex
Commits
2cbdb36e
Commit
2cbdb36e
authored
Apr 07, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add forgotten "status" history save, restore and accumulate.
parent
6a7139b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
apachedex/__init__.py
apachedex/__init__.py
+9
-0
No files found.
apachedex/__init__.py
View file @
2cbdb36e
...
@@ -396,6 +396,9 @@ class GenericSiteStats(object):
...
@@ -396,6 +396,9 @@ class GenericSiteStats(object):
attribute
=
getattr
(
result
,
attribute_id
)
attribute
=
getattr
(
result
,
attribute_id
)
for
key
,
apdex_state
in
state
[
attribute_id
].
iteritems
():
for
key
,
apdex_state
in
state
[
attribute_id
].
iteritems
():
attribute
[
key
]
=
APDEXStats
.
fromJSONState
(
apdex_state
,
getDuration
)
attribute
[
key
]
=
APDEXStats
.
fromJSONState
(
apdex_state
,
getDuration
)
status
=
result
.
status
for
status_code
,
date_dict
in
state
[
'status'
].
iteritems
():
status
[
status_code
].
update
(
date_dict
)
return
result
return
result
def
asJSONState
(
self
):
def
asJSONState
(
self
):
...
@@ -405,6 +408,7 @@ class GenericSiteStats(object):
...
@@ -405,6 +408,7 @@ class GenericSiteStats(object):
'error_url_count'
:
getattr
(
self
,
'error_url_count'
,
None
),
'error_url_count'
:
getattr
(
self
,
'error_url_count'
,
None
),
'url_apdex'
:
_APDEXDateDictAsJSONState
(
self
.
url_apdex
),
'url_apdex'
:
_APDEXDateDictAsJSONState
(
self
.
url_apdex
),
'apdex'
:
_APDEXDateDictAsJSONState
(
self
.
apdex
),
'apdex'
:
_APDEXDateDictAsJSONState
(
self
.
apdex
),
'status'
:
self
.
status
,
}
}
def
accumulateFrom
(
self
,
other
):
def
accumulateFrom
(
self
,
other
):
...
@@ -419,6 +423,11 @@ class GenericSiteStats(object):
...
@@ -419,6 +423,11 @@ class GenericSiteStats(object):
self_attribute
=
getattr
(
self
,
attribute_id
)
self_attribute
=
getattr
(
self
,
attribute_id
)
for
key
,
apdex_data
in
getattr
(
other
,
attribute_id
).
iteritems
():
for
key
,
apdex_data
in
getattr
(
other
,
attribute_id
).
iteritems
():
self_attribute
[
key
].
accumulateFrom
(
apdex_data
)
self_attribute
[
key
].
accumulateFrom
(
apdex_data
)
status
=
self
.
status
for
status_code
,
other_date_dict
in
other
.
status
.
iteritems
():
date_dict
=
status
[
status_code
]
for
date
,
count
in
other_date_dict
.
iteritems
():
date_dict
[
date
]
+=
count
class
ERP5SiteStats
(
GenericSiteStats
):
class
ERP5SiteStats
(
GenericSiteStats
):
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment