0
0
Fork 0

Use more realistic load values

This commit is contained in:
Stormwind 2013-05-31 08:03:19 +02:00
parent 8c4226399f
commit 3de6426953
1 changed files with 18 additions and 1 deletions

View File

@ -8,7 +8,24 @@ numberGenerator = Random.new()
# heatmap over 5 minutes by one measure per 5 sec
dummyList = Array.new(60) do
# 16 dummy cores
cores = Array.new(16) { numberGenerator.rand(100) }
# lets say 7 cores have a load up to 10%
# 5 have a load up to 30%
# 3 have a load up to 70%
# and 1 has a load up to 100%
j = 0
cores = Array.new(16) do
j = j + 1
case
when j <= 7
numberGenerator.rand(10)
when (j >= 8 and j <= 12)
numberGenerator.rand(30)
when (j >= 13 and j <= 15)
numberGenerator.rand(70)
when j == 16
numberGenerator.rand(100)
end
end
# every 10 load percent one heatpoint
i = 0
Array.new(10) do