diff --git a/testdummies/load_values.json b/testdummies/load_values.json deleted file mode 100644 index e49fb0c..0000000 --- a/testdummies/load_values.json +++ /dev/null @@ -1,65 +0,0 @@ -[ - [0.10169491525423728814,0.43333333333333333333,0.38333333333333333333,0.20000000000000000000,0.11666666666666666667,0.06666666666666666667,0.31666666666666666667,0.06666666666666666667,0.35593220338983050847,0.93333333333333333333,0.10000000000000000000,6.5500000000000000,0.70000000000000000000,3.2500000000000000,0.33333333333333333333,5.1333333333333333], - [0.00000000000000000000,0.05000000000000000000,0.10000000000000000000,0.03333333333333333333,0.01666666666666666667,0.00000000000000000000,0.05000000000000000000,0.01666666666666666667,2.1500000000000000,2.4833333333333333,3.0166666666666667,3.6000000000000000,2.6333333333333333,12.0833333333333333,9.7500000000000000,3.3666666666666667], - [0.00000000000000000000,0.01666666666666666667,0.03333333333333333333,0.00000000000000000000,0.01666666666666666667,0.01666666666666666667,0.03333333333333333333,0.03333333333333333333,36.9666666666666667,52.2000000000000000,46.0833333333333333,63.2333333333333333,27.7333333333333333,69.4333333333333333,23.8500000000000000,56.3500000000000000], - [0.53333333333333333333,1.5500000000000000,1.8833333333333333,4.8333333333333333,2.2500000000000000,6.5333333333333333,2.9333333333333333,2.0500000000000000,21.0666666666666667,57.0166666666666667,27.3166666666666667,36.1666666666666667,45.2166666666666667,71.3500000000000000,29.4666666666666667,76.2166666666666667], - [31.8666666666666667,19.1166666666666667,44.7166666666666667,33.2666666666666667,46.9833333333333333,29.4500000000000000,49.0833333333333333,29.4166666666666667,8.7166666666666667,11.5833333333333333,29.5500000000000000,3.1333333333333333,18.7333333333333333,26.7500000000000000,6.4000000000000000,5.1500000000000000], - [8.3666666666666667,10.0166666666666667,10.8000000000000000,9.6500000000000000,11.3000000000000000,7.1833333333333333,9.7166666666666667,2.5500000000000000,12.7833333333333333,1.8500000000000000,6.7666666666666667,1.6000000000000000,7.8833333333333333,52.2666666666666667,11.4166666666666667,1.3833333333333333], - [1.9500000000000000,3.5666666666666667,6.1833333333333333,12.9500000000000000,14.1000000000000000,8.4166666666666667,12.5333333333333333,2.7833333333333333,12.3000000000000000,2.0333333333333333,5.0166666666666667,3.4000000000000000,7.5666666666666667,65.8666666666666667,9.5833333333333333,5.5166666666666667], - [10.5500000000000000,7.6000000000000000,8.5666666666666667,12.1333333333333333,8.2333333333333333,8.4166666666666667,8.4666666666666667,7.7166666666666667,18.5000000000000000,11.4666666666666667,5.1000000000000000,11.3333333333333333,11.2333333333333333,28.2833333333333333,8.4833333333333333,2.9000000000000000], - [8.2000000000000000,7.1000000000000000,6.8333333333333333,3.6333333333333333,8.1833333333333333,2.1833333333333333,4.6833333333333333,2.6500000000000000,2.6000000000000000,16.5500000000000000,3.7500000000000000,4.6333333333333333,3.4000000000000000,26.2333333333333333,1.3166666666666667,4.8000000000000000], - [0.01666666666666666667,0.01666666666666666667,0.36666666666666666667,0.15000000000000000000,0.05000000000000000000,0.11666666666666666667,0.10000000000000000000,0.11666666666666666667,10.9000000000000000,6.9166666666666667,10.5333333333333333,7.1500000000000000,18.0833333333333333,26.6166666666666667,16.0166666666666667,9.6833333333333333], - [1.1166666666666667,0.56666666666666666667,0.31666666666666666667,1.0166666666666667,0.35000000000000000000,1.8000000000000000,0.38333333333333333333,0.35000000000000000000,14.5333333333333333,12.9500000000000000,15.4833333333333333,6.8333333333333333,11.4500000000000000,19.5000000000000000,16.6166666666666667,14.2666666666666667], - [15.7666666666666667,8.4000000000000000,10.8166666666666667,16.0666666666666667,5.6500000000000000,7.9000000000000000,5.9333333333333333,8.7666666666666667,9.0166666666666667,8.2833333333333333,7.7166666666666667,15.8833333333333333,9.6333333333333333,33.3833333333333333,4.9500000000000000,11.5333333333333333], - [8.1333333333333333,8.7833333333333333,7.6000000000000000,6.5833333333333333,6.6666666666666667,12.0666666666666667,8.3500000000000000,13.6500000000000000,0.98333333333333333333,1.7500000000000000,0.46666666666666666667,5.4000000000000000,0.75000000000000000000,8.6000000000000000,1.6500000000000000,3.9666666666666667], - [5.3500000000000000,8.3833333333333333,7.8666666666666667,7.3166666666666667,6.0666666666666667,5.2166666666666667,7.0833333333333333,2.5833333333333333,0.50000000000000000000,1.3666666666666667,0.48333333333333333333,1.9500000000000000,4.2500000000000000,7.4833333333333333,0.45000000000000000000,5.9833333333333333], - [0.08333333333333333333,0.45000000000000000000,0.16666666666666666667,0.21666666666666666667,0.10000000000000000000,0.08333333333333333333,0.05000000000000000000,0.35000000000000000000,0.13333333333333333333,0.70000000000000000000,0.81666666666666666667,2.2333333333333333,1.5666666666666667,4.1166666666666667,0.00000000000000000000,5.8333333333333333], - [2.5333333333333333,2.1000000000000000,3.4333333333333333,2.4500000000000000,2.2333333333333333,1.3500000000000000,1.0333333333333333,2.7500000000000000,0.51666666666666666667,1.7333333333333333,2.0333333333333333,7.1166666666666667,2.2833333333333333,3.5500000000000000,0.10000000000000000000,5.1666666666666667], - [0.01666666666666666667,0.03333333333333333333,0.01666666666666666667,0.05000000000000000000,0.01666666666666666667,0.00000000000000000000,0.00000000000000000000,0.01666666666666666667,3.0000000000000000,1.8166666666666667,1.5333333333333333,5.6500000000000000,0.06666666666666666667,1.4500000000000000,0.00000000000000000000,2.2833333333333333], - [0.00000000000000000000,0.05000000000000000000,0.03333333333333333333,0.01666666666666666667,0.03333333333333333333,0.00000000000000000000,0.01666666666666666667,0.00000000000000000000,0.00000000000000000000,1.6333333333333333,0.76666666666666666667,5.4666666666666667,0.00000000000000000000,2.7166666666666667,0.10000000000000000000,5.1666666666666667], - [0.03333333333333333333,0.00000000000000000000,0.01666666666666666667,0.01666666666666666667,0.05000000000000000000,0.01666666666666666667,0.05000000000000000000,0.05000000000000000000,0.00000000000000000000,2.6000000000000000,2.1166666666666667,1.4333333333333333,0.58333333333333333333,6.1333333333333333,0.16666666666666666667,2.7333333333333333], - [0.01666666666666666667,0.00000000000000000000,0.00000000000000000000,0.05000000000000000000,0.00000000000000000000,0.00000000000000000000,0.00000000000000000000,0.01666666666666666667,0.25000000000000000000,1.7666666666666667,0.58333333333333333333,6.0500000000000000,0.90000000000000000000,2.1000000000000000,0.05000000000000000000,5.2000000000000000], - [0.01666666666666666667,0.03333333333333333333,0.03333333333333333333,0.03333333333333333333,0.00000000000000000000,0.01666666666666666667,0.01666666666666666667,0.01666666666666666667,1.1666666666666667,2.2500000000000000,4.6333333333333333,5.2500000000000000,0.00000000000000000000,0.63333333333333333333,0.00000000000000000000,1.4833333333333333], - [0.60000000000000000000,0.60000000000000000000,0.38333333333333333333,0.75000000000000000000,0.41666666666666666667,0.46666666666666666667,0.35000000000000000000,0.43333333333333333333,3.0166666666666667,2.2166666666666667,5.0666666666666667,7.1333333333333333,5.7000000000000000,2.2166666666666667,15.2833333333333333,2.0166666666666667], - [0.16666666666666666667,1.7333333333333333,2.2166666666666667,3.8833333333333333,1.2666666666666667,1.5500000000000000,3.7000000000000000,0.26666666666666666667,36.1833333333333333,52.0833333333333333,43.9833333333333333,56.5833333333333333,40.7500000000000000,45.8500000000000000,54.2500000000000000,57.4833333333333333], - [0.10000000000000000000,0.31666666666666666667,0.80000000000000000000,0.11666666666666666667,0.51666666666666666667,0.31666666666666666667,0.38333333333333333333,0.15000000000000000000,38.6000000000000000,40.0333333333333333,58.0000000000000000,55.6500000000000000,22.7000000000000000,44.9833333333333333,33.0666666666666667,58.8333333333333333], - [0.45000000000000000000,0.93333333333333333333,1.3500000000000000,1.9166666666666667,1.3000000000000000,0.60000000000000000000,0.65000000000000000000,0.18333333333333333333,30.1833333333333333,5.2500000000000000,13.9166666666666667,3.7666666666666667,13.8833333333333333,10.2000000000000000,25.1166666666666667,3.0833333333333333], - [0.43333333333333333333,0.70000000000000000000,1.2166666666666667,1.6666666666666667,1.4833333333333333,0.46666666666666666667,0.55000000000000000000,0.18333333333333333333,10.3333333333333333,15.8833333333333333,20.5000000000000000,17.3500000000000000,21.3000000000000000,4.6166666666666667,11.6500000000000000,6.4500000000000000], - [0.15000000000000000000,1.4000000000000000,1.2833333333333333,0.76666666666666666667,1.7833333333333333,0.51666666666666666667,0.90000000000000000000,0.60000000000000000000,13.9166666666666667,9.1000000000000000,8.9000000000000000,21.3666666666666667,22.7333333333333333,10.5000000000000000,6.8833333333333333,12.5166666666666667], - [0.25000000000000000000,1.2166666666666667,1.7500000000000000,1.7666666666666667,1.4000000000000000,0.36666666666666666667,1.4333333333333333,0.38333333333333333333,7.6833333333333333,14.5333333333333333,8.8666666666666667,7.2666666666666667,7.5000000000000000,11.1666666666666667,12.7833333333333333,17.7333333333333333], - [0.41666666666666666667,0.08333333333333333333,0.10000000000000000000,0.10000000000000000000,0.23333333333333333333,0.03333333333333333333,0.06666666666666666667,0.01666666666666666667,11.0666666666666667,13.6833333333333333,11.5333333333333333,7.4666666666666667,8.7333333333333333,18.8500000000000000,10.9833333333333333,10.6833333333333333], - [0.50000000000000000000,0.58333333333333333333,0.35000000000000000000,1.0166666666666667,0.56666666666666666667,1.0166666666666667,0.31666666666666666667,0.43333333333333333333,15.7166666666666667,8.2000000000000000,12.3500000000000000,10.3166666666666667,11.6000000000000000,7.7666666666666667,17.8500000000000000,5.8333333333333333], - [0.58333333333333333333,1.3000000000000000,2.1500000000000000,0.88333333333333333333,1.6333333333333333,1.1166666666666667,1.0333333333333333,0.06666666666666666667,10.7333333333333333,12.3666666666666667,6.1500000000000000,6.6500000000000000,7.3500000000000000,6.1166666666666667,9.3833333333333333,10.0166666666666667], - [0.86666666666666666667,1.1666666666666667,2.2333333333333333,3.1833333333333333,0.58333333333333333333,0.98333333333333333333,3.0833333333333333,0.25000000000000000000,2.5666666666666667,3.2000000000000000,1.6666666666666667,9.7833333333333333,1.6333333333333333,1.5333333333333333,1.3833333333333333,4.4833333333333333], - [0.08333333333333333333,0.73333333333333333333,1.3000000000000000,0.53333333333333333333,1.1666666666666667,0.41666666666666666667,0.30000000000000000000,0.33333333333333333333,0.00000000000000000000,1.6333333333333333,0.00000000000000000000,7.7666666666666667,0.00000000000000000000,1.6500000000000000,0.01666666666666666667,5.2666666666666667], - [0.35000000000000000000,0.48333333333333333333,0.95000000000000000000,1.9500000000000000,1.2000000000000000,0.50000000000000000000,0.35000000000000000000,0.36666666666666666667,0.05000000000000000000,1.6166666666666667,0.00000000000000000000,3.3500000000000000,0.00000000000000000000,4.8833333333333333,2.4833333333333333,3.5000000000000000], - [0.55000000000000000000,0.26666666666666666667,0.61666666666666666667,0.38333333333333333333,0.50000000000000000000,1.2833333333333333,0.15000000000000000000,0.10000000000000000000,0.03333333333333333333,2.3166666666666667,0.53333333333333333333,2.8333333333333333,0.00000000000000000000,7.2666666666666667,0.00000000000000000000,2.9000000000000000], - [0.20000000000000000000,0.70000000000000000000,0.18333333333333333333,0.43333333333333333333,0.76666666666666666667,0.51666666666666666667,0.13333333333333333333,0.25000000000000000000,0.00000000000000000000,2.4166666666666667,3.3666666666666667,5.2000000000000000,0.18333333333333333333,2.3500000000000000,0.00000000000000000000,2.2166666666666667], - [0.01666666666666666667,0.13333333333333333333,0.10000000000000000000,0.08333333333333333333,0.05000000000000000000,0.13333333333333333333,0.08333333333333333333,0.03333333333333333333,0.00000000000000000000,0.75000000000000000000,0.13333333333333333333,2.3333333333333333,0.00000000000000000000,1.7166666666666667,8.9666666666666667,1.4833333333333333], - [0.01666666666666666667,0.08333333333333333333,0.03333333333333333333,0.10000000000000000000,0.06666666666666666667,0.05000000000000000000,0.08333333333333333333,0.03333333333333333333,0.00000000000000000000,1.1666666666666667,0.36666666666666666667,1.00000000000000000000,0.00000000000000000000,0.35000000000000000000,11.4166666666666667,1.9500000000000000], - [0.08333333333333333333,0.03333333333333333333,0.01666666666666666667,0.05000000000000000000,0.05000000000000000000,0.05000000000000000000,0.26666666666666666667,0.08333333333333333333,1.1500000000000000,1.2166666666666667,0.98333333333333333333,3.8833333333333333,0.00000000000000000000,1.8666666666666667,3.4833333333333333,2.3333333333333333], - [0.03333333333333333333,0.13333333333333333333,0.01666666666666666667,0.03333333333333333333,0.05000000000000000000,0.08333333333333333333,0.05000000000000000000,0.00000000000000000000,0.00000000000000000000,0.50000000000000000000,0.36666666666666666667,6.2333333333333333,0.00000000000000000000,7.2166666666666667,0.00000000000000000000,1.9333333333333333], - [0.06666666666666666667,0.10000000000000000000,1.3666666666666667,1.9833333333333333,1.8833333333333333,1.00000000000000000000,0.43333333333333333333,1.4500000000000000,0.00000000000000000000,0.25000000000000000000,0.86666666666666666667,8.6166666666666667,0.01666666666666666667,3.3333333333333333,0.00000000000000000000,2.4166666666666667], - [0.03333333333333333333,0.01666666666666666667,0.01666666666666666667,0.03333333333333333333,0.03333333333333333333,0.03333333333333333333,0.01666666666666666667,0.05000000000000000000,0.00000000000000000000,0.71666666666666666667,0.05000000000000000000,4.2000000000000000,0.60000000000000000000,1.5666666666666667,0.00000000000000000000,8.2500000000000000], - [0.01666666666666666667,0.06666666666666666667,0.03333333333333333333,0.01666666666666666667,0.00000000000000000000,0.06666666666666666667,0.08333333333333333333,0.08333333333333333333,0.00000000000000000000,2.8333333333333333,1.4666666666666667,3.9500000000000000,0.58333333333333333333,5.5833333333333333,0.05000000000000000000,5.4833333333333333], - [0.01666666666666666667,0.01666666666666666667,0.01666666666666666667,0.06666666666666666667,0.01666666666666666667,0.01666666666666666667,0.03333333333333333333,0.03333333333333333333,0.00000000000000000000,2.3000000000000000,1.1166666666666667,1.5000000000000000,2.1166666666666667,2.4166666666666667,11.0666666666666667,1.6666666666666667], - [0.05000000000000000000,0.01666666666666666667,0.08333333333333333333,0.03333333333333333333,0.00000000000000000000,0.01666666666666666667,0.08333333333333333333,0.06666666666666666667,0.18333333333333333333,1.5333333333333333,0.08333333333333333333,3.8166666666666667,0.00000000000000000000,2.4166666666666667,6.5500000000000000,2.9166666666666667], - [0.03333333333333333333,0.05000000000000000000,0.06666666666666666667,0.01666666666666666667,0.00000000000000000000,0.00000000000000000000,0.01666666666666666667,0.03333333333333333333,0.01666666666666666667,1.9000000000000000,1.3833333333333333,2.8833333333333333,0.01666666666666666667,3.5000000000000000,7.1000000000000000,2.0166666666666667], - [0.03333333333333333333,0.00000000000000000000,0.05000000000000000000,0.05000000000000000000,0.01666666666666666667,0.06666666666666666667,0.00000000000000000000,0.01666666666666666667,0.00000000000000000000,4.5833333333333333,1.7666666666666667,0.53333333333333333333,1.7666666666666667,5.9333333333333333,6.0166666666666667,4.3666666666666667], - [0.06666666666666666667,0.03333333333333333333,0.06666666666666666667,0.08333333333333333333,0.03333333333333333333,0.05000000000000000000,0.05000000000000000000,0.01666666666666666667,0.00000000000000000000,5.4833333333333333,4.5833333333333333,1.3833333333333333,0.25000000000000000000,4.5333333333333333,3.7166666666666667,5.7166666666666667], - [0.25000000000000000000,0.16666666666666666667,0.23333333333333333333,0.16666666666666666667,0.30000000000000000000,0.05000000000000000000,0.93333333333333333333,0.05000000000000000000,1.8666666666666667,4.5166666666666667,3.0000000000000000,1.4333333333333333,1.1666666666666667,4.4166666666666667,5.5333333333333333,6.7166666666666667], - [0.01666666666666666667,0.05000000000000000000,0.01666666666666666667,0.05000000000000000000,0.01666666666666666667,0.01666666666666666667,0.06666666666666666667,0.06666666666666666667,3.4333333333333333,8.9333333333333333,0.93333333333333333333,6.0166666666666667,0.03333333333333333333,10.1500000000000000,1.5166666666666667,4.8333333333333333], - [0.08333333333333333333,0.11666666666666666667,0.03333333333333333333,0.10000000000000000000,0.13333333333333333333,0.06666666666666666667,0.08333333333333333333,0.08333333333333333333,2.3833333333333333,1.9000000000000000,0.96666666666666666667,0.88333333333333333333,0.11666666666666666667,10.0666666666666667,0.05000000000000000000,1.5166666666666667], - [0.01666666666666666667,0.05000000000000000000,0.05000000000000000000,0.01666666666666666667,0.05000000000000000000,0.05000000000000000000,0.00000000000000000000,0.05000000000000000000,0.00000000000000000000,3.8833333333333333,1.3666666666666667,6.1333333333333333,0.60000000000000000000,5.5833333333333333,0.08333333333333333333,5.1833333333333333], - [0.01666666666666666667,0.03333333333333333333,0.06666666666666666667,0.05000000000000000000,0.03333333333333333333,0.06666666666666666667,0.05000000000000000000,0.06666666666666666667,0.65000000000000000000,2.0666666666666667,2.0000000000000000,3.3500000000000000,3.2000000000000000,3.5833333333333333,6.0166666666666667,2.4166666666666667], - [0.00000000000000000000,0.05000000000000000000,0.06666666666666666667,0.11666666666666666667,0.05000000000000000000,0.01666666666666666667,0.10000000000000000000,0.05000000000000000000,0.40000000000000000000,1.5333333333333333,1.2000000000000000,4.5500000000000000,0.25000000000000000000,5.5833333333333333,2.6500000000000000,6.0166666666666667], - [0.03333333333333333333,0.08333333333333333333,0.01666666666666666667,0.05000000000000000000,0.01666666666666666667,0.01666666666666666667,0.03333333333333333333,0.05000000000000000000,0.53333333333333333333,2.3833333333333333,2.3500000000000000,1.4666666666666667,8.1166666666666667,4.1000000000000000,3.2000000000000000,4.0000000000000000], - [0.01666666666666666667,0.03333333333333333333,0.03333333333333333333,0.00000000000000000000,0.03333333333333333333,0.03333333333333333333,0.05000000000000000000,0.01666666666666666667,1.0833333333333333,5.2833333333333333,2.4000000000000000,2.4000000000000000,1.2000000000000000,5.9500000000000000,4.7833333333333333,6.3833333333333333], - [0.03333333333333333333,0.05000000000000000000,0.00000000000000000000,0.01666666666666666667,0.03333333333333333333,0.03333333333333333333,0.03333333333333333333,0.03333333333333333333,1.7500000000000000,5.4166666666666667,2.4500000000000000,1.2666666666666667,1.8666666666666667,4.2333333333333333,7.5000000000000000,6.6333333333333333], - [0.01666666666666666667,0.03333333333333333333,0.01666666666666666667,0.03333333333333333333,0.05000000000000000000,0.01666666666666666667,0.05000000000000000000,0.05000000000000000000,2.7000000000000000,5.6333333333333333,2.8833333333333333,2.4000000000000000,2.9666666666666667,3.9000000000000000,0.68333333333333333333,8.4500000000000000], - [0.06666666666666666667,0.15000000000000000000,1.0166666666666667,0.38333333333333333333,0.05000000000000000000,0.06666666666666666667,0.01666666666666666667,0.01666666666666666667,0.60000000000000000000,2.1166666666666667,0.13333333333333333333,3.2333333333333333,0.00000000000000000000,5.7333333333333333,0.23333333333333333333,3.4833333333333333], - [0.06666666666666666667,0.05000000000000000000,0.06666666666666666667,0.03333333333333333333,0.03333333333333333333,0.08333333333333333333,0.01666666666666666667,0.05000000000000000000,0.70000000000000000000,1.2000000000000000,1.7333333333333333,5.1333333333333333,0.00000000000000000000,3.5166666666666667,0.23333333333333333333,2.6333333333333333], - [0.00000000000000000000,0.03333333333333333333,0.05000000000000000000,0.05000000000000000000,0.03333333333333333333,0.01666666666666666667,0.05000000000000000000,0.01666666666666666667,0.71666666666666666667,1.4000000000000000,0.38333333333333333333,5.9333333333333333,0.01666666666666666667,4.7333333333333333,0.18333333333333333333,3.3666666666666667], - [0.06666666666666666667,0.08333333333333333333,0.03333333333333333333,0.05000000000000000000,0.18333333333333333333,0.16666666666666666667,0.06666666666666666667,0.05000000000000000000,0.30000000000000000000,1.6166666666666667,0.83333333333333333333,2.2666666666666667,1.7333333333333333,3.8333333333333333,1.7000000000000000,4.8000000000000000], - [0.02941176470588235294,0.05882352941176470588,0.05882352941176470588,0.02941176470588235294,0.23529411764705882353,0.02941176470588235294,0.02941176470588235294,0.17647058823529411765,6.1833333333333333,3.6833333333333333,3.7666666666666667,1.3166666666666667,2.1666666666666667,6.8333333333333333,1.8333333333333333,1.9000000000000000] - ] diff --git a/testdummies/testdummy.rb b/testdummies/testdummy.rb deleted file mode 100644 index 79f88fd..0000000 --- a/testdummies/testdummy.rb +++ /dev/null @@ -1,57 +0,0 @@ -require 'RMagick' -require 'json' - -include Magick - -data = JSON::load(File.new('load_values.json', 'r')) - -# prepare data -dummyList = Array.new() -data.each do |cores| - - # Add all loads to compute how much % is one % load - loadSum = 0 - cores.each { |core| loadSum = loadSum + core } - percentLoad = 100.0/loadSum - - # every 10 load percent one heatpoint - i = 0 - dummyList << Array.new(10) do - # get all cores in the certain percentage - selectedCores= cores.select { |core| core >= i and core < (i+10)} - # (go to next level here) - i = i + 10 - # add the load of the resulting cores and multiply it with the overall value - loadSum = 0 - selectedCores.each { |core| loadSum = loadSum + core } - percent = loadSum*percentLoad - end - -end - -# puts dummyList.inspect - -# image size -x = dummyList.length*15 - -# start drawing the damn thing -loadImg = Image.new(x,150) { self.background_color = "white" } - -i = 0 -dummyList.each do |point| - j = 0 - point.reverse.each do |cores| - # draw a red rectangle on the white background - core = Draw.new - - l = (255-((cores*1.275))).round - core.fill(Pixel.from_hsla(0, 255, l, 1).to_color) - core.rectangle((i*15), (j*15), ((i+1)*15), ((j+1)*15)) - core.draw loadImg - j = j + 1 - end - i = i + 1 -end - -loadImg.display -# loadImg.write('loadimage.png') diff --git a/testdummies/testdummy2.rb b/testdummies/testdummy2.rb deleted file mode 100644 index f98088f..0000000 --- a/testdummies/testdummy2.rb +++ /dev/null @@ -1,51 +0,0 @@ -require 'RMagick' -require 'json' - -include Magick - -data = JSON::load(File.new('load_values.json', 'r')) -weigthOfOneCore = 127.5/data[0].length - -# prepare data -dummyList = Array.new() - -data.each do |cores| - # every 10 load percent one heatpoint - i = 0 - dummyList << Array.new(10) do - amount = cores.select { |core| core >= i and core < (i+10)}.length - i = i + 10 - amount - end -end - -# puts dummyList.inspect - -# image size -x = dummyList.length*15 - -# start drawing the damn thing -loadImg = Image.new(x,150) { self.background_color = "white" } - -i = 0 -dummyList.each do |point| - j = 0 - k = 10 - point.reverse.each do |cores| - # draw a red rectangle on the white background - core = Draw.new - - weightedCores = k**0.8*cores*weigthOfOneCore - weightedCores = 127.5 if weightedCores > 127.5 - l = (255-weightedCores).round - core.fill(Pixel.from_hsla(0, 255, l, 1).to_color) - core.rectangle((i*15), (j*15), ((i+1)*15), ((j+1)*15)) - core.draw loadImg - j = j + 1 - k = k - 1 - end - i = i + 1 -end - -loadImg.display -# loadImg.write('loadimage2.png') diff --git a/testdummies/testdummy3.rb b/testdummies/testdummy3.rb deleted file mode 100644 index 27ed3e5..0000000 --- a/testdummies/testdummy3.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'RMagick' -require 'json' - -include Magick - -data = JSON::load(File.new('load_values.json', 'r')) -weigthOfOneCore = 127.5/data[0].length - -# prepare data -dummyList = Array.new() - -data.each do |cores| - # every 10 load percent one heatpoint - i = 0 - dummyList << Array.new(10) do - amount = cores.select { |core| core >= i and core < (i+10)}.length - i = i + 10 - amount - end -end - -# puts dummyList.inspect - -# image size -x = dummyList.length*15 - -# start drawing the damn thing -loadImg = Image.new(x,150) { self.background_color = "white" } - -i = 0 -dummyList.each do |point| - j = 0 - point.reverse.each do |cores| - # draw a red rectangle on the white background - core = Draw.new - - weightedCores = cores*weigthOfOneCore - weightedCores = 127.5 if weightedCores > 127.5 - l = (255-weightedCores).round - core.fill(Pixel.from_hsla(0, 255, l, 1).to_color) - core.rectangle((i*15), (j*15), ((i+1)*15), ((j+1)*15)) - core.draw loadImg - j = j + 1 - end - i = i + 1 -end - -loadImg.display -# loadImg.write('loadimage3.png')