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
...
@@ -14,6 +14,7 @@ module Worker( --init
)
where
)
where
import
Control.Distributed.Process
(
NodeId
)
import
Control.Distributed.Process
(
NodeId
)
import
Data.Maybe
(
fromJust
)
import
Table
(
Freq
,
freq_to_stat
)
import
Table
(
Freq
,
freq_to_stat
)
import
Utils
(
now
)
import
Utils
(
now
)
...
@@ -57,36 +58,24 @@ worker_stats node frequency statData =
...
@@ -57,36 +58,24 @@ worker_stats node frequency statData =
verts_recvd_from_stat
::
WorkerStats
->
Int
verts_recvd_from_stat
::
WorkerStats
->
Int
verts_recvd_from_stat
stat
=
verts_recvd_from_stat
stat
=
case
"vertices_recvd"
`
lookup
`
stat
of
read
(
fromJust
(
"vertices_recvd"
`
lookup
`
stat
))
::
Int
Just
val
->
read
val
::
Int
Nothing
->
0
-- instead of false
credit_retd_from_stat
::
WorkerStats
->
Int
credit_retd_from_stat
::
WorkerStats
->
Int
credit_retd_from_stat
stat
=
credit_retd_from_stat
stat
=
case
"credit_retd"
`
lookup
`
stat
of
read
(
fromJust
(
"credit_retd"
`
lookup
`
stat
))
::
Int
Just
val
->
read
val
::
Int
Nothing
->
0
-- instead of false
min_atomic_credit_from_stat
::
WorkerStats
->
Int
min_atomic_credit_from_stat
::
WorkerStats
->
Int
min_atomic_credit_from_stat
stat
=
min_atomic_credit_from_stat
stat
=
case
"min_atomic_credit"
`
lookup
`
stat
of
read
(
fromJust
(
"min_atomic_credit"
`
lookup
`
stat
))
::
Int
Just
val
->
read
val
::
Int
Nothing
->
0
-- instead of false
init_idle_from_stat
::
WorkerStats
->
Int
init_idle_from_stat
::
WorkerStats
->
Int
init_idle_from_stat
stat
=
init_idle_from_stat
stat
=
case
"init_idle_time"
`
lookup
`
stat
of
read
(
fromJust
(
"init_idle_time"
`
lookup
`
stat
))
::
Int
Just
val
->
read
val
::
Int
Nothing
->
0
-- instead of false
tail_idle_from_stat
::
WorkerStats
->
Int
tail_idle_from_stat
::
WorkerStats
->
Int
tail_idle_from_stat
stat
=
tail_idle_from_stat
stat
=
case
"tail_idle_time"
`
lookup
`
stat
of
read
(
fromJust
(
"tail_idle_time"
`
lookup
`
stat
))
::
Int
Just
val
->
read
val
::
Int
Nothing
->
0
-- instead of false
max_idle_from_stat
::
WorkerStats
->
Int
max_idle_from_stat
::
WorkerStats
->
Int
max_idle_from_stat
stat
=
max_idle_from_stat
stat
=
case
"max_idle_time"
`
lookup
`
stat
of
read
(
fromJust
(
"max_idle_time"
`
lookup
`
stat
))
::
Int
Just
val
->
read
val
::
Int
Nothing
->
0
-- instead of false
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