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
2fec6055
Commit
2fec6055
authored
Mar 19, 2014
by
Georgios Dagkakis
Committed by
Jérome Perrin
Apr 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CoreObject updated to be able to keep wip stats
parent
96ea0d59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+11
-2
No files found.
dream/simulation/CoreObject.py
View file @
2fec6055
...
...
@@ -52,8 +52,7 @@ class CoreObject(Process):
self
.
isPreemptive
=
False
self
.
resetOnPreemption
=
False
self
.
interruptCause
=
None
self
.
gatherWipStat
=
False
def
initialize
(
self
):
# XXX why call super.__init__ outside of __init__ ?
...
...
@@ -118,6 +117,10 @@ class CoreObject(Process):
self
.
shouldPreempt
=
False
#flag that shows that the machine should preempt or not
self
.
lastGiver
=
None
# variable that holds the last giver of the object, used by machine in case of preemption
# initialize the wipStatList -
# TODO, think what to do in multiple runs
# TODO, this should be also updated in Globals.setWIP (in case we have initial wip)
self
.
wipStatList
=
[[
0
,
0
]]
# =======================================================================
# the main process of the core object
...
...
@@ -149,6 +152,9 @@ class CoreObject(Process):
self
.
timeLastEntityLeft
=
now
()
self
.
outputTrace
(
entity
.
name
,
"released "
+
self
.
objName
)
# update wipStatList
if
self
.
gatherWipStat
:
self
.
wipStatList
.
append
([
now
(),
len
(
activeObjectQueue
)])
return
entity
# =======================================================================
...
...
@@ -245,6 +251,9 @@ class CoreObject(Process):
activeEntity
.
hot
=
True
# # TESTING
# print now(), activeEntity.id, "got into "+self.id
# update wipStatList
if
self
.
gatherWipStat
:
self
.
wipStatList
.
append
([
now
(),
len
(
activeObjectQueue
)])
return
activeEntity
# =======================================================================
...
...
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