Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-orbit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Katerina Roukounaki
cloud-orbit
Commits
38d09209
Commit
38d09209
authored
Nov 18, 2014
by
Yiannis Tsiouris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor refinements in case-of stmts
parent
ba82c36d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
18 deletions
+7
-18
Worker.hs
Worker.hs
+7
-18
No files found.
Worker.hs
View file @
38d09209
...
...
@@ -14,6 +14,7 @@ module Worker( --init
)
where
import
Control.Distributed.Process
(
NodeId
)
import
Data.Maybe
(
fromJust
)
import
Table
(
Freq
,
freq_to_stat
)
import
Utils
(
now
)
...
...
@@ -57,36 +58,24 @@ worker_stats node frequency statData =
verts_recvd_from_stat
::
WorkerStats
->
Int
verts_recvd_from_stat
stat
=
case
"vertices_recvd"
`
lookup
`
stat
of
Just
val
->
read
val
::
Int
Nothing
->
0
-- instead of false
read
(
fromJust
(
"vertices_recvd"
`
lookup
`
stat
))
::
Int
credit_retd_from_stat
::
WorkerStats
->
Int
credit_retd_from_stat
stat
=
case
"credit_retd"
`
lookup
`
stat
of
Just
val
->
read
val
::
Int
Nothing
->
0
-- instead of false
read
(
fromJust
(
"credit_retd"
`
lookup
`
stat
))
::
Int
min_atomic_credit_from_stat
::
WorkerStats
->
Int
min_atomic_credit_from_stat
stat
=
case
"min_atomic_credit"
`
lookup
`
stat
of
Just
val
->
read
val
::
Int
Nothing
->
0
-- instead of false
read
(
fromJust
(
"min_atomic_credit"
`
lookup
`
stat
))
::
Int
init_idle_from_stat
::
WorkerStats
->
Int
init_idle_from_stat
stat
=
case
"init_idle_time"
`
lookup
`
stat
of
Just
val
->
read
val
::
Int
Nothing
->
0
-- instead of false
read
(
fromJust
(
"init_idle_time"
`
lookup
`
stat
))
::
Int
tail_idle_from_stat
::
WorkerStats
->
Int
tail_idle_from_stat
stat
=
case
"tail_idle_time"
`
lookup
`
stat
of
Just
val
->
read
val
::
Int
Nothing
->
0
-- instead of false
read
(
fromJust
(
"tail_idle_time"
`
lookup
`
stat
))
::
Int
max_idle_from_stat
::
WorkerStats
->
Int
max_idle_from_stat
stat
=
case
"max_idle_time"
`
lookup
`
stat
of
Just
val
->
read
val
::
Int
Nothing
->
0
-- instead of false
read
(
fromJust
(
"max_idle_time"
`
lookup
`
stat
))
::
Int
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