Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletions
+15
-1
cloud/context_processors.py
+15
-1
No files found.
cloud/context_processors.py
View file @
b258b5a9
...
...
@@ -7,7 +7,21 @@ def process_debug(req):
return
{
'DEBUG'
:
DEBUG
}
def
process_stat
(
req
):
stat
=
cache
.
get
(
'cloud_stat'
)
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'
)
return
{
'STAT_DEBUG'
:
STAT_DEBUG
,
'cloud_stat'
:
stat
,
...
...
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