Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
c241776d
Commit
c241776d
authored
Mar 01, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New output widget showing a graph of queue lenghts
parent
47a49af9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
4 deletions
+50
-4
dream/platform/static/css/demo-new.css
dream/platform/static/css/demo-new.css
+10
-0
dream/platform/static/index.html
dream/platform/static/index.html
+4
-0
dream/platform/static/src/dream.js
dream/platform/static/src/dream.js
+12
-0
dream/platform/static/src/dream_launcher.js
dream/platform/static/src/dream_launcher.js
+1
-0
dream/simulation/GUI/Default.py
dream/simulation/GUI/Default.py
+8
-1
dream/simulation/Globals.py
dream/simulation/Globals.py
+8
-3
dream/simulation/Queue.py
dream/simulation/Queue.py
+7
-0
No files found.
dream/platform/static/css/demo-new.css
View file @
c241776d
...
...
@@ -264,6 +264,16 @@ path, ._jsPlumb_endpoint {
margin-top
:
0px
;
}
#queue_stat_graph
{
width
:
70%
;
height
:
250px
;
text-align
:
center
;
margin-left
:
auto
;
margin-right
:
auto
;
padding-top
:
2px
;
margin-top
:
0px
;
}
.ui-button
{
width
:
80%
;
margin
:
4px
0
;
...
...
dream/platform/static/index.html
View file @
c241776d
...
...
@@ -74,6 +74,10 @@
<div
id=
"graph"
></div>
</div>
<div
id=
"exit_stat"
></div>
<div
id=
"queue_stat"
>
<div>
Queues Statistics
</div>
<div
id=
"queue_stat_graph"
></div>
</div>
<div
id=
"job_gantt"
style=
'width:1320px; height:800px;'
></div>
<div
id=
"job_schedule_spreadsheet"
style=
"display: none; overflow: scroll;"
></div>
...
...
dream/platform/static/src/dream.js
View file @
c241776d
...
...
@@ -517,6 +517,18 @@
$
.
plot
(
"
#graph
"
,
series
,
options
);
}
if
(
configuration
[
'
Dream-Configuration
'
].
gui
.
queue_stat
){
var
queue_stat
=
$
(
"
#queue_stat
"
).
show
();
var
series
=
[];
$
.
each
(
result
.
elementList
,
function
(
idx
,
el
){
if
(
el
.
_class
==
'
Dream.Queue
'
){
series
.
push
({
label
:
el
.
name
||
el
.
id
,
data
:
el
.
wip_stat_list
})
}
})
$
.
plot
(
"
#queue_stat_graph
"
,
series
);
}
if
(
configuration
[
'
Dream-Configuration
'
].
gui
.
exit_stat
){
var
exit_stat
=
$
(
"
#exit_stat
"
).
show
().
text
(
"
Exit Metrics
"
);
$
.
each
(
result
.
elementList
,
function
(
idx
,
el
){
...
...
dream/platform/static/src/dream_launcher.js
View file @
c241776d
...
...
@@ -69,6 +69,7 @@
$
(
'
#job_schedule_spreadsheet
'
).
hide
();
$
(
'
#shift_spreadsheet
'
).
hide
();
$
(
"
#job_gantt
"
).
hide
();
$
(
"
#queue_stat
"
).
hide
();
$
(
"
#wip_part_spreadsheet
"
).
hide
();
if
(
configuration
[
'
Dream-Configuration
'
].
gui
.
wip_part_spreadsheet
){
...
...
dream/simulation/GUI/Default.py
View file @
c241776d
...
...
@@ -275,7 +275,13 @@ class Simulation(object):
"property_list"
:
[
schema
[
"capacity"
]],
"_class"
:
'Dream.Repairman'
},
"Dream-EventGenerator"
:
{
"name"
:
"Event Generator"
,
"short_id"
:
"EG"
,
"property_list"
:
[
schema
[
'start'
],
schema
[
'stop'
],
schema
[
'duration'
],
schema
[
'interval'
],
schema
[
'method'
],
schema
[
'argumentDict'
]],
"_class"
:
"Dream.EventGenerator"
,
},
# global configuration
"Dream-Configuration"
:
{
"property_list"
:
[
...
...
@@ -296,6 +302,7 @@ class Simulation(object):
'job_schedule_spreadsheet'
:
0
,
'job_gantt'
:
0
,
'exit_stat'
:
1
,
'queue_stat'
:
1
,
},
"_class"
:
'Dream.Configuration'
},
...
...
dream/simulation/Globals.py
View file @
c241776d
...
...
@@ -194,6 +194,11 @@ def countIntervalThroughput(argumentDict={}):
previouslyExited
=
sum
(
obj
.
intervalThroughPutList
)
currentExited
+=
totalExited
-
previouslyExited
obj
.
intervalThroughPutList
.
append
(
currentExited
)
from
Queue
import
Queue
def
countQueueMetrics
(
argumentDict
=
{}):
for
obj
in
G
.
ObjList
:
if
isinstance
(
obj
,
Queue
):
obj
.
wip_stat_list
.
append
((
now
(),
len
(
obj
.
Res
.
activeQ
)))
dream/simulation/Queue.py
View file @
c241776d
...
...
@@ -72,6 +72,9 @@ class Queue(CoreObject):
raise
ValueError
(
"Unknown scheduling rule %s for %s"
%
(
scheduling_rule
,
id
))
# Will be populated by an event generator
self
.
wip_stat_list
=
[]
@
staticmethod
def
getSupportedSchedulingRules
():
return
(
"FIFO"
,
"Priority"
,
"EDD"
,
"EOD"
,
...
...
@@ -292,4 +295,8 @@ class Queue(CoreObject):
from
Globals
import
G
json
=
{
'_class'
:
'Dream.%s'
%
self
.
__class__
.
__name__
,
'id'
:
str
(
self
.
id
),
}
# XXX this have to be updated to support multiple generations
if
G
.
numberOfReplications
==
1
and
self
.
wip_stat_list
:
json
[
'wip_stat_list'
]
=
self
.
wip_stat_list
G
.
outputJSON
[
'elementList'
].
append
(
json
)
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