r4715 - trunk/cumin/python/cumin
by croberts@fedoraproject.org
Author: croberts
Date: 2011-04-14 20:15:40 +0000 (Thu, 14 Apr 2011)
New Revision: 4715
Modified:
trunk/cumin/python/cumin/model.py
Log:
In order to fix BZ https://bugzilla.redhat.com/show_bug.cgi?id=696619 we now take an extra step when converting the timestamp into a date. If the timestamp given is non-positive, we give a value of "NA" rather than a timezone adjusted version of the epoch.
Modified: trunk/cumin/python/cumin/model.py
===================================================================
--- trunk/cumin/python/cumin/model.py 2011-04-13 22:01:49 UTC (rev 4714)
+++ trunk/cumin/python/cumin/model.py 2011-04-14 20:15:40 UTC (rev 4715)
@@ -272,8 +272,15 @@
self.group = "Other"
def render_datetime(self, session, value):
- value = datetime.fromtimestamp(int(value))
- return fmt_datetime(value)
+ #if the timestamp passed in is zero or negative, we translate that to
+ # "NA" to display per BZ 696619
+ timestamp = value
+ retval = "NA"
+ if int(timestamp) > 0:
+ value = datetime.fromtimestamp(int(value))
+ retval = fmt_datetime(value)
+
+ return retval
class CuminAction(object):
def __init__(self, cls, name):
13 years, 1 month
r4714 - in trunk: cumin/model cumin/python/cumin rosemary/python/rosemary
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-13 22:01:49 +0000 (Wed, 13 Apr 2011)
New Revision: 4714
Modified:
trunk/cumin/model/rosemary.xml
trunk/cumin/python/cumin/stat.py
trunk/rosemary/python/rosemary/model.py
Log:
Add a new element to the rosemary.xml override file to define a shortened attribute title to use for timeseries flash charts
Modified: trunk/cumin/model/rosemary.xml
===================================================================
--- trunk/cumin/model/rosemary.xml 2011-04-13 21:59:05 UTC (rev 4713)
+++ trunk/cumin/model/rosemary.xml 2011-04-13 22:01:49 UTC (rev 4714)
@@ -342,6 +342,42 @@
<statistic name="SumRunningTimeCum">
<title>Sum running time cumulative</title>
</statistic>
+ <statistic name="JobCompletionRate">
+ <short>Completion</short>
+ </statistic>
+ <statistic name="JobStartRate">
+ <short>Start</short>
+ </statistic>
+ <statistic name="JobSubmissionRate">
+ <short>Submission</short>
+ </statistic>
+ <statistic name="JobsSubmittedCum">
+ <short>Submitted</short>
+ </statistic>
+ <statistic name="JobsCompletedCum">
+ <short>Completed</short>
+ </statistic>
+ <statistic name="JobsStartedCum">
+ <short>Started</short>
+ </statistic>
+ <statistic name="JobsExited">
+ <short>Exited</short>
+ </statistic>
+ <statistic name="JobsExitedCum">
+ <short>Exited cumulative</short>
+ </statistic>
+ <statistic name="MeanRunningTimeCum">
+ <short>Cumulative</short>
+ </statistic>
+ <statistic name="MeanTimeToStartCum">
+ <short>Cumulative</short>
+ </statistic>
+ <statistic name="ShadowExceptionsCum">
+ <short>Cumulative</short>
+ </statistic>
+ <statistic name="JobsExitedCum">
+ <short>Cumulative</short>
+ </statistic>
</class>
Modified: trunk/cumin/python/cumin/stat.py
===================================================================
--- trunk/cumin/python/cumin/stat.py 2011-04-13 21:59:05 UTC (rev 4713)
+++ trunk/cumin/python/cumin/stat.py 2011-04-13 22:01:49 UTC (rev 4714)
@@ -1078,6 +1078,7 @@
chart.elements.append(line)
def get_line_title(self, stat):
+ return stat.short_title and stat.short_title or stat.title
return stat.title
def get_chart(self, session, adapter, stats, samples, duration, max_value, min_value, append, end_secs):
Modified: trunk/rosemary/python/rosemary/model.py
===================================================================
--- trunk/rosemary/python/rosemary/model.py 2011-04-13 21:59:05 UTC (rev 4713)
+++ trunk/rosemary/python/rosemary/model.py 2011-04-13 22:01:49 UTC (rev 4714)
@@ -529,6 +529,7 @@
self.title = None
self.description = None
+ self.short_title = None
self.sql_column = None
@@ -543,6 +544,7 @@
def extend(self, elem):
self.title = elem.findtext("title")
+ self.short_title = elem.findtext("short")
self.unique = elem.get("unique", "n") == "y" and True
formatter = elem.findtext("formatter")
if formatter:
13 years, 1 month
r4713 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-13 21:59:05 +0000 (Wed, 13 Apr 2011)
New Revision: 4713
Modified:
trunk/cumin/python/cumin/grid/scheduler.py
Log:
Shorten the legends in the flash charts
Modified: trunk/cumin/python/cumin/grid/scheduler.py
===================================================================
--- trunk/cumin/python/cumin/grid/scheduler.py 2011-04-13 17:49:57 UTC (rev 4712)
+++ trunk/cumin/python/cumin/grid/scheduler.py 2011-04-13 21:59:05 UTC (rev 4713)
@@ -162,51 +162,52 @@
charts = WidgetSet(app, "charts")
self.add_child(charts)
- chart = self.HourChart(app, "submitted", scheduler)
+ chart = StatFlashChart(app, "submitted", scheduler)
chart.title = "Submitted/started/completed"
+ chart.duration.param.default = "3600"
chart.stats = ("JobsSubmitted", "JobsStarted", "JobsCompleted")
charts.add_child(chart)
- chart = self.HourChart(app, "started", scheduler)
- chart.title = "Rates"
+ chart = StatFlashChart(app, "started", scheduler)
+ chart.title = "Job rates"
chart.stats = ("JobSubmissionRate", "JobStartRate", "JobCompletionRate")
+ chart.duration.param.default = "3600"
charts.add_child(chart)
- chart = self.HourChart(app, "completed", scheduler)
+ chart = StatFlashChart(app, "completed", scheduler)
chart.title = "Cumulative"
chart.stats = ("JobsSubmittedCum", "JobsStartedCum", "JobsCompletedCum")
+ chart.duration.param.default = "3600"
charts.add_child(chart)
- chart = self.HourChart(app, "exited", scheduler)
- chart.title = "Exited"
+ chart = StatFlashChart(app, "exited", scheduler)
+ chart.title = "Jobs exited"
chart.stats = ("JobsExited", "JobsExitedCum")
+ chart.duration.param.default = "3600"
charts.add_child(chart)
- chart = self.HourChart(app, "exception", scheduler)
+ chart = StatFlashChart(app, "exception", scheduler)
chart.title = "Shadow exceptions"
chart.stats = ("ShadowExceptions", "ShadowExceptionsCum")
+ chart.duration.param.default = "3600"
charts.add_child(chart)
- chart = self.HourChart(app, "start_time", scheduler)
+ chart = StatFlashChart(app, "start_time", scheduler)
chart.title = "Mean start times"
chart.stats = ("MeanTimeToStart", "MeanTimeToStartCum")
+ chart.duration.param.default = "3600"
charts.add_child(chart)
- chart = self.HourChart(app, "running_time", scheduler)
+ chart = StatFlashChart(app, "running_time", scheduler)
chart.title = "Mean running times"
chart.stats = ("MeanRunningTime", "MeanRunningTimeCum")
+ chart.duration.param.default = "3600"
charts.add_child(chart)
def render_title(self, session):
return "Performance"
-
+
def render_statswindow(self, session):
# get the average WindowedStarWidth for all schedulers
statswindow = self.frame.object.get(session).WindowedStatWidth
return statswindow
-
- class HourChart(StatFlashChart):
- def __init__(self, app, name, scheduler):
- super(SchedulerOverviewCycle.HourChart, self).__init__(app, name, scheduler)
-
- self.duration.param.default = "3600"
13 years, 1 month
r4712 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-13 17:49:57 +0000 (Wed, 13 Apr 2011)
New Revision: 4712
Modified:
trunk/cumin/python/cumin/grid/slotvis.py
Log:
Make slot vis 740px wide instead of 800px
Fix slot vis height so we don't see black areas when the font is resized.
Modified: trunk/cumin/python/cumin/grid/slotvis.py
===================================================================
--- trunk/cumin/python/cumin/grid/slotvis.py 2011-04-13 15:43:28 UTC (rev 4711)
+++ trunk/cumin/python/cumin/grid/slotvis.py 2011-04-13 17:49:57 UTC (rev 4712)
@@ -1,4 +1,5 @@
import logging
+import math
from wooly import Session, Widget
from wooly.util import StringCatalog
@@ -154,21 +155,21 @@
return sess.marshal()
def render_slot_chart_width(self, session):
- return 800
- return self.render_slot_clip_size(session)
+ return 740
def render_slot_chart_height(self, session):
cursor = self.slots.execute(session)
data = cursor.fetchall()
- # allow 44 px per machine up to 8100
- rows = len(data) / 4
- if rows % 4:
- rows += 1
- total_height = rows * 43.6
- at_least = max(total_height, self.slot_clip_size)
- return min(at_least, 8100)
+ slot_size = 51
+ count = len(data)
+ # individual slots are 51 px wide and tall
+ width = self.render_slot_chart_width(session)
+ cols = int(width / slot_size)
+ rows = int(math.ceil(count / cols))
+ return rows * slot_size
+
def render_fullpageable(self, session):
return self.fullpageable and "fullpageable" or ""
13 years, 1 month
r4711 - trunk/cumin/python/cumin/grid
by croberts@fedoraproject.org
Author: croberts
Date: 2011-04-13 15:43:28 +0000 (Wed, 13 Apr 2011)
New Revision: 4711
Modified:
trunk/cumin/python/cumin/grid/slotvis.py
Log:
Tweak per the UI review meeting. The slotvis page will no longer have a "by system" radio button. Also making the "by activity/state" the default (first) radio button"
Modified: trunk/cumin/python/cumin/grid/slotvis.py
===================================================================
--- trunk/cumin/python/cumin/grid/slotvis.py 2011-04-13 15:11:07 UTC (rev 4710)
+++ trunk/cumin/python/cumin/grid/slotvis.py 2011-04-13 15:43:28 UTC (rev 4711)
@@ -186,10 +186,9 @@
def __init__(self, app, name):
super(PoolSlotFlashVis.GroupBySwitch, self).__init__(app, name)
- self.add_state("System", "By system")
- self.add_state("AccountingGroup", "By accounting group")
self.add_state("Activity|State", "By activity/state")
-
+ self.add_state("AccountingGroup", "By accounting group")
+
def get_click(self, session, state):
href = self.parent.render_slots_href(session)
return "return slot_vis('%s', this, '%s', '%s')" % \
13 years, 1 month
r4710 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-13 15:11:07 +0000 (Wed, 13 Apr 2011)
New Revision: 4710
Modified:
trunk/cumin/python/cumin/grid/dashboard.py
Log:
Change the default duration for the negotiator chart to 1 hour
Remove the rate from the negotiator chart
Modified: trunk/cumin/python/cumin/grid/dashboard.py
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.py 2011-04-13 15:08:52 UTC (rev 4709)
+++ trunk/cumin/python/cumin/grid/dashboard.py 2011-04-13 15:11:07 UTC (rev 4710)
@@ -605,6 +605,7 @@
self.chart_link = StatFlashChart(app, "popup", collector)
self.chart_link.stats = self.attrs
+ self.chart_link.duration.param.default = "3600"
self.add_child(self.chart_link)
def render_title(self, session):
@@ -780,7 +781,7 @@
chart = self.ThroughputChart(app, "timeseries", throughput_stats.negotiator)
chart.duration.param.default = "3600"
- chart.stats = self.attrs
+ chart.stats = self.attrs[:-1]
self.add_child(chart)
class ThroughputChart(StatFlashChart):
13 years, 1 month
r4709 - trunk/cumin/python/cumin/grid
by croberts@fedoraproject.org
Author: croberts
Date: 2011-04-13 15:08:52 +0000 (Wed, 13 Apr 2011)
New Revision: 4709
Modified:
trunk/cumin/python/cumin/grid/scheduler.py
trunk/cumin/python/cumin/grid/submission.py
Log:
In order to fix BZ https://bugzilla.redhat.com/show_bug.cgi?id=695722 I have added a SubmissionFrame to the SchedulerFrame. Additionally, we new pass the frame into PoolSubmissionSelector to be able to control the targets of the resulting links.
Modified: trunk/cumin/python/cumin/grid/scheduler.py
===================================================================
--- trunk/cumin/python/cumin/grid/scheduler.py 2011-04-12 19:32:16 UTC (rev 4708)
+++ trunk/cumin/python/cumin/grid/scheduler.py 2011-04-13 15:08:52 UTC (rev 4709)
@@ -10,6 +10,7 @@
from submission import PoolSubmissionSelector
from cumin.objectselector import ObjectSelectorTable, ObjectSelector,\
ObjectLinkColumn, MonitorSelfStatColumn, ObjectTable
+from cumin.grid.submission import SubmissionFrame
strings = StringCatalog(__file__)
log = logging.getLogger("cumin.grid.scheduler")
@@ -22,6 +23,9 @@
self.submitter = SubmitterFrame(app, "submitter")
self.add_mode(self.submitter)
+
+ self.submission = SubmissionFrame(app, "submission")
+ self.add_mode(self.submission)
overview = SchedulerOverview(app, "overview", self.object)
self.view.add_tab(overview)
@@ -37,7 +41,8 @@
class SchedulerPoolSubmissionSelector(PoolSubmissionSelector):
def __init__(self, app, name, scheduler, pool):
- super(SchedulerPoolSubmissionSelector, self).__init__(app, name, pool)
+ frame = "main.grid.scheduler.submission"
+ super(SchedulerPoolSubmissionSelector, self).__init__(app, name, pool, frame)
self.add_reference_filter(scheduler, self.cls.jobserverRef)
self.enable_csv_export(pool, scheduler)
@@ -45,7 +50,7 @@
def create_table(self, app, name, cls):
return self.JoinTable(app, name, cls)
- class JoinTable(ObjectSelectorTable):
+ class JoinTable(ObjectTable):
def get_data_values(self, session):
values = super(SchedulerPoolSubmissionSelector.JoinTable, self).get_data_values(session)
Modified: trunk/cumin/python/cumin/grid/submission.py
===================================================================
--- trunk/cumin/python/cumin/grid/submission.py 2011-04-12 19:32:16 UTC (rev 4708)
+++ trunk/cumin/python/cumin/grid/submission.py 2011-04-13 15:08:52 UTC (rev 4709)
@@ -80,15 +80,14 @@
return ObjectTable(app, name, cls)
class PoolSubmissionSelector(SubmissionSelector):
- def __init__(self, app, name, pool):
+ def __init__(self, app, name, pool, frame="main.grid.submission"):
super(PoolSubmissionSelector, self).__init__(app, name)
self.pool = pool
cls = app.model.com_redhat_grid.JobServer
self.add_filter(self.pool, cls.Pool)
-
- frame = "main.grid.submission"
+
col = ObjectLinkColumn(app, "name", self.cls.Name, self.cls._id, frame)
self.insert_column(0, col)
self.add_search_filter(col)
13 years, 1 month
r4708 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-12 19:32:16 +0000 (Tue, 12 Apr 2011)
New Revision: 4708
Modified:
trunk/cumin/python/cumin/grid/dashboard.py
trunk/cumin/python/cumin/grid/dashboard.strings
Log:
re-rearrange the grid overview summary widgets
Modified: trunk/cumin/python/cumin/grid/dashboard.py
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.py 2011-04-12 17:46:35 UTC (rev 4707)
+++ trunk/cumin/python/cumin/grid/dashboard.py 2011-04-12 19:32:16 UTC (rev 4708)
@@ -45,28 +45,28 @@
def render_title(self, session):
return "Scheuler Stats"
-class DashboardSummary(WidgetSet):
+class DashboardSummary(Widget):
def __init__(self, app, name, collector):
super(DashboardSummary, self).__init__(app, name)
+ job_data = DashboardOverviewJobSummary(app, "job_info", collector)
+ self.add_child(job_data)
+
+ slot_data = GridSlotsSummary(app, "host_info", collector)
+ self.add_child(slot_data)
+
+ neg_through = NegotiatorJobThroughput(app, "negotiator_throughput", collector)
+ self.add_child(neg_through)
+
cls = app.model.com_redhat_grid.Scheduler
# tell the DashboardSummaryStats to average this column
setattr(cls.MeanTimeToStart, "average", True)
columns = (cls.JobSubmissionRate, cls.JobStartRate, cls.JobCompletionRate, cls.MeanTimeToStart)
- stats = FootnoteDashboardSummaryStats(app, "rates", collector, cls, columns, "Scheduler.Jobs")
+ stats = FootnoteDashboardSummaryStats(app, "scheduler_info", collector, cls, columns, "Scheduler.Jobs")
stats.title = "Job scheduler info"
self.add_child(stats)
- job_data = DashboardOverviewJobSummary(app, "jobs_summary", collector)
- self.add_child(job_data)
-
- slot_data = GridSlotsSummary(app, "slots_summary", collector)
- self.add_child(slot_data)
-
- neg_through = NegotiatorJobThroughput(app, "negotiator_throughput", collector)
- self.add_child(neg_through)
-
def render_title(self, session):
return "Summary"
Modified: trunk/cumin/python/cumin/grid/dashboard.strings
===================================================================
--- trunk/cumin/python/cumin/grid/dashboard.strings 2011-04-12 17:46:35 UTC (rev 4707)
+++ trunk/cumin/python/cumin/grid/dashboard.strings 2011-04-12 19:32:16 UTC (rev 4708)
@@ -1,12 +1,12 @@
[DashboardSummary.html]
<div id="{id}" class="{class}">
- {widgets}
+ {job_info}
+ {host_info}
+ <div style="clear:both;"></div>
+ {negotiator_throughput}{scheduler_info}
</div>
<div style="clear:both;"></div>
-[DashboardSummary.widget_html]
-{widget}
-
[MonitorSelfStats.css]
div.MonitorSelfStats div.data {
margin-left: 2em;
@@ -107,7 +107,7 @@
.DefinitionSet dt {
clear: left;
float: left;
- width: 15em;
+ width: 14em;
margin: 0;
padding: 5px;
border-top: 1px solid #999;
@@ -141,7 +141,7 @@
.DefinitionSet dd span {
text-align: right;
- width: 5em;
+ width: 4em;
display: block;
}
@@ -212,20 +212,18 @@
<dd title="{html_title}" {dd_class}><span>{item_value}</span></dd>
[NegotiatorJobThroughput.css]
-div.NegotiatorJobThroughput {
- clear: both;
- padding-top: 2em;
-}
-
div.NegotiatorJobThroughput div.timeseries {
float: left;
}
+div.NegotiatorJobThroughput div.stats dt {
+ width: 12em;
+}
+
[NegotiatorJobThroughput.html]
<div class="{class}">
<div class="stats">{stats}</div>
<div class="timeseries">{timeseries}</div>
- <div style="clear:both;"></div>
</div>
[MinimalTableHeader.html]
@@ -284,6 +282,14 @@
font-size: 80%;
}
+div.DefinitionSet.FootnoteDashboardSummaryStats {
+ margin-right: 0;
+}
+
+div.DefinitionSet.FootnoteDashboardSummaryStats dt {
+ width: 12em;
+}
+
[FootnoteDashboardSummaryStats.html]
<div id="{id}" class="{class}">
<h3>{title}</h3>
13 years, 1 month
r4707 - trunk/cumin/python/cumin/grid
by eallen@fedoraproject.org
Author: eallen
Date: 2011-04-12 17:46:35 +0000 (Tue, 12 Apr 2011)
New Revision: 4707
Modified:
trunk/cumin/python/cumin/grid/scheduler.py
Log:
Remove start time and running time cumulative values from the scheduler charts
Modified: trunk/cumin/python/cumin/grid/scheduler.py
===================================================================
--- trunk/cumin/python/cumin/grid/scheduler.py 2011-04-12 17:44:45 UTC (rev 4706)
+++ trunk/cumin/python/cumin/grid/scheduler.py 2011-04-12 17:46:35 UTC (rev 4707)
@@ -184,12 +184,12 @@
chart = self.HourChart(app, "start_time", scheduler)
chart.title = "Mean start times"
- chart.stats = ("MeanTimeToStart", "MeanTimeToStartCum", "SumTimeToStartCum")
+ chart.stats = ("MeanTimeToStart", "MeanTimeToStartCum")
charts.add_child(chart)
chart = self.HourChart(app, "running_time", scheduler)
chart.title = "Mean running times"
- chart.stats = ("MeanRunningTime", "MeanRunningTimeCum", "SumRunningTimeCum")
+ chart.stats = ("MeanRunningTime", "MeanRunningTimeCum")
charts.add_child(chart)
def render_title(self, session):
13 years, 1 month
r4706 - trunk/cumin/python/cumin/grid
by croberts@fedoraproject.org
Author: croberts
Date: 2011-04-12 17:44:45 +0000 (Tue, 12 Apr 2011)
New Revision: 4706
Modified:
trunk/cumin/python/cumin/grid/scheduler.strings
Log:
Per updated BZ https://bugzilla.redhat.com/show_bug.cgi?id=694883 Moved and re-worded the WindowedStatsWidow notification text. The text now appears at the bottom of the page.
Modified: trunk/cumin/python/cumin/grid/scheduler.strings
===================================================================
--- trunk/cumin/python/cumin/grid/scheduler.strings 2011-04-12 16:46:45 UTC (rev 4705)
+++ trunk/cumin/python/cumin/grid/scheduler.strings 2011-04-12 17:44:45 UTC (rev 4706)
@@ -28,14 +28,13 @@
div.statsnote {
font-style: italic;
font-size: 80%;
- padding-bottom: 0.5em;
}
[SchedulerOverviewCycle.html]
-<div class="statsnote">
- *The following stats are averaged over a {statswindow} second sampling window
-</div>
<div class="{class}">
{charts}
</div>
<div style="clear:both;"></div>
+<div class="statsnote">
+ *The stats on this page are averaged over a {statswindow} second sampling window
+</div>
13 years, 1 month