src/admin_panel/app/models/resource_usage.rb in webroar-0.2.2 vs src/admin_panel/app/models/resource_usage.rb in webroar-0.2.3

- old
+ new

@@ -1,8 +1,8 @@ #-- # WebROaR - Ruby Application Server - http://webroar.in/ -# Copyright (C) 2009 WebROaR +# Copyright (C) 2009 Goonj LLC # # This file is part of WebROaR. # # WebROaR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -88,11 +88,11 @@ wall_time[i] = (start_time+i*60).strftime("%H:%M") end end max, slab = get_max_and_slab(max) fill_gaps!(final_data) - step = interval / 20 + step = (interval + 1) / 20 return wall_time, final_data, max, slab, step end #This method Returns the Resource Usage data for a particular application. This data is used to plot the graph for cpu usage and memory usage for that application. @@ -127,10 +127,10 @@ end end max,slab = get_max_and_slab(max) fill_gaps!(final_data) - step = interval / 20 + step = (interval + 1) / 20 return wall_time, final_data, max, slab, step end #This method gives the maximum value for y axis and the value by which the y axis is to be partitioned. def get_max_and_slab(max)