Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b258b5a9
authored
Mar 14, 2013
by
Bence Dányi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cloud: stat debug data added
parent
408c64c3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
cloud/context_processors.py
+14
-0
No files found.
cloud/context_processors.py
View file @
b258b5a9
...
@@ -7,6 +7,20 @@ def process_debug(req):
...
@@ -7,6 +7,20 @@ def process_debug(req):
return
{
'DEBUG'
:
DEBUG
}
return
{
'DEBUG'
:
DEBUG
}
def
process_stat
(
req
):
def
process_stat
(
req
):
if
STAT_DEBUG
:
stat
=
{
'CPU'
:
{
'USED_CPU'
:
10
,
'ALLOC_CPU'
:
20
,
'FREE_CPU'
:
70
},
'MEM'
:
{
'USED_MEM'
:
567
,
'ALLOC_MEM'
:
371
,
'FREE_MEM'
:
2048
-
567
-
371
}
}
else
:
stat
=
cache
.
get
(
'cloud_stat'
)
stat
=
cache
.
get
(
'cloud_stat'
)
return
{
return
{
'STAT_DEBUG'
:
STAT_DEBUG
,
'STAT_DEBUG'
:
STAT_DEBUG
,
...
...
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