You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by fa...@apache.org on 2010/11/08 19:56:57 UTC
svn commit: r1032668 -
/incubator/vcl/trunk/managementnode/lib/VCL/Module/Predictive/Level_1.pm
Author: fapeeler
Date: Mon Nov 8 18:56:57 2010
New Revision: 1032668
URL: http://svn.apache.org/viewvc?rev=1032668&view=rev
Log:
extended usage variables
Modified:
incubator/vcl/trunk/managementnode/lib/VCL/Module/Predictive/Level_1.pm
Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/Predictive/Level_1.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/Predictive/Level_1.pm?rev=1032668&r1=1032667&r2=1032668&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/Predictive/Level_1.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Predictive/Level_1.pm Mon Nov 8 18:56:57 2010
@@ -214,21 +214,30 @@ sub get_next_image {
# check if > X% usage, look at past X days, otherwise, look at past 2 months
my $timeframe;
my $notavail = ($online - $avail);
- if (($notavail / $online) > 0.35) {
- $timeframe = '1 DAY';
- }
- elsif(($notavail / $online) > 0.25) {
- $timeframe = '2 DAY';
- }
- elsif(($notavail / $online) > 0.15) {
- $timeframe = '5 DAY';
- }
- elsif(($notavail / $online) > 0.10) {
- $timeframe = '10 DAY';
- }
- elsif(($notavail / $online) > 0.05) {
- $timeframe = '20 DAY';
- }
+ if ( $usage > 0.40) {
+ $timeframe = '1 DAY';
+ }
+ elsif( $usage > 0.35) {
+ $timeframe = '2 DAY';
+ }
+ elsif( $usage > 0.30) {
+ $timeframe = '3 DAY';
+ }
+ elsif( $usage > 0.25) {
+ $timeframe = '4 DAY';
+ }
+ elsif( $usage > 0.20) {
+ $timeframe = '5 DAY';
+ }
+ elsif( $usage > 0.15) {
+ $timeframe = '10 DAY';
+ }
+ elsif( $usage > 0.10) {
+ $timeframe = '20 DAY';
+ }
+ elsif( $usage > 0.05) {
+ $timeframe = '30 DAY';
+ }
else {
$timeframe = '2 MONTH';
}