rhmessaging commits: r3273 - store/branches/java/0.5-release/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb.
by rhmessaging-commits@lists.jboss.org
Author: ritchiem
Date: 2009-04-09 11:40:04 -0400 (Thu, 09 Apr 2009)
New Revision: 3273
Modified:
store/branches/java/0.5-release/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
Log:
RHM-8 : Applied patch from Robert Godfrey with some additional comments
REVERTED change as performance difference was negligable
Merged reverting change from trunk r3272
Modified: store/branches/java/0.5-release/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
===================================================================
--- store/branches/java/0.5-release/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2009-04-09 15:37:17 UTC (rev 3272)
+++ store/branches/java/0.5-release/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2009-04-09 15:40:04 UTC (rev 3273)
@@ -500,7 +500,8 @@
_log.debug("Message Id: " + messageId + " Removing");
}
- //Remove the MetaData then iterate deleting all the ContentChunks we can for the given messageId
+ // first we need to look up the header to get the chunk count
+ MessageMetaData mmd = getMessageMetaData(context, messageId);
try
{
OperationStatus status = _messageMetaDataDb.delete(tx, key);
@@ -522,21 +523,45 @@
DatabaseEntry contentKey = new DatabaseEntry();
TupleBinding contentKeyBinding = new MessageContentKey.TupleBinding();
- int i = 0;
-
- do
+ for (int i = 0; i < mmd.getContentChunkCount(); i++)
{
MessageContentKey mck = new MessageContentKey(messageId, i);
contentKeyBinding.objectToEntry(mck, contentKey);
+ status = _messageContentDb.get(tx, contentKey, new DatabaseEntry(), LockMode.RMW);
+ if (status == OperationStatus.NOTFOUND)
+ {
+ if (localTx)
+ {
+ tx.abort();
+ context.setPayload(null);
+ }
+
+ throw new AMQException("Content chunk " + i + " not found for message " + messageId);
+ }
+
status = _messageContentDb.delete(tx, contentKey);
- i++;
- } while (status != OperationStatus.NOTFOUND);
+ if (status == OperationStatus.NOTFOUND)
+ {
+ if (localTx)
+ {
+ tx.abort();
+ context.setPayload(null);
+ }
+ throw new AMQException("Content chunk " + i + " not found for message " + messageId);
+ }
+
+ if (_log.isDebugEnabled())
+ {
+ _log.debug("Deleted content chunk " + i + " for message " + messageId);
+ }
+ }
+
if (localTx)
{
- // Should we not be doing this async as
+ // ? Will this not perform the environment default commit? Should we not be doing this async as
// remove will only occur when message has been fully dequeued? 2009-03-31
- commit(tx);
+ tx.commit();
context.setPayload(null);
}
}
15 years, 2 months
rhmessaging commits: r3272 - store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb.
by rhmessaging-commits@lists.jboss.org
Author: ritchiem
Date: 2009-04-09 11:37:17 -0400 (Thu, 09 Apr 2009)
New Revision: 3272
Modified:
store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
Log:
RHM-8 : Applied patch from Robert Godfrey with some additional comments
REVERTED commit r3270 as there was negligable change in performance.
Modified: store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
===================================================================
--- store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2009-04-09 12:13:49 UTC (rev 3271)
+++ store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2009-04-09 15:37:17 UTC (rev 3272)
@@ -500,7 +500,8 @@
_log.debug("Message Id: " + messageId + " Removing");
}
- //Remove the MetaData then iterate deleting all the ContentChunks we can for the given messageId
+ // first we need to look up the header to get the chunk count
+ MessageMetaData mmd = getMessageMetaData(context, messageId);
try
{
OperationStatus status = _messageMetaDataDb.delete(tx, key);
@@ -522,21 +523,45 @@
DatabaseEntry contentKey = new DatabaseEntry();
TupleBinding contentKeyBinding = new MessageContentKey.TupleBinding();
- int i = 0;
-
- do
+ for (int i = 0; i < mmd.getContentChunkCount(); i++)
{
MessageContentKey mck = new MessageContentKey(messageId, i);
contentKeyBinding.objectToEntry(mck, contentKey);
+ status = _messageContentDb.get(tx, contentKey, new DatabaseEntry(), LockMode.RMW);
+ if (status == OperationStatus.NOTFOUND)
+ {
+ if (localTx)
+ {
+ tx.abort();
+ context.setPayload(null);
+ }
+
+ throw new AMQException("Content chunk " + i + " not found for message " + messageId);
+ }
+
status = _messageContentDb.delete(tx, contentKey);
- i++;
- } while (status != OperationStatus.NOTFOUND);
+ if (status == OperationStatus.NOTFOUND)
+ {
+ if (localTx)
+ {
+ tx.abort();
+ context.setPayload(null);
+ }
+ throw new AMQException("Content chunk " + i + " not found for message " + messageId);
+ }
+
+ if (_log.isDebugEnabled())
+ {
+ _log.debug("Deleted content chunk " + i + " for message " + messageId);
+ }
+ }
+
if (localTx)
{
- // Should we not be doing this async as
+ // ? Will this not perform the environment default commit? Should we not be doing this async as
// remove will only occur when message has been fully dequeued? 2009-03-31
- commit(tx);
+ tx.commit();
context.setPayload(null);
}
}
15 years, 2 months
rhmessaging commits: r3271 - store/branches/java/0.5-release/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb.
by rhmessaging-commits@lists.jboss.org
Author: ritchiem
Date: 2009-04-09 08:13:49 -0400 (Thu, 09 Apr 2009)
New Revision: 3271
Modified:
store/branches/java/0.5-release/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
Log:
RHM-8 : Applied patch from Robert Godfrey with some additional comments. Merged from trunk r3270
Modified: store/branches/java/0.5-release/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
===================================================================
--- store/branches/java/0.5-release/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2009-04-09 12:11:12 UTC (rev 3270)
+++ store/branches/java/0.5-release/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2009-04-09 12:13:49 UTC (rev 3271)
@@ -500,8 +500,7 @@
_log.debug("Message Id: " + messageId + " Removing");
}
- // first we need to look up the header to get the chunk count
- MessageMetaData mmd = getMessageMetaData(context, messageId);
+ //Remove the MetaData then iterate deleting all the ContentChunks we can for the given messageId
try
{
OperationStatus status = _messageMetaDataDb.delete(tx, key);
@@ -523,45 +522,21 @@
DatabaseEntry contentKey = new DatabaseEntry();
TupleBinding contentKeyBinding = new MessageContentKey.TupleBinding();
- for (int i = 0; i < mmd.getContentChunkCount(); i++)
+ int i = 0;
+
+ do
{
MessageContentKey mck = new MessageContentKey(messageId, i);
contentKeyBinding.objectToEntry(mck, contentKey);
- status = _messageContentDb.get(tx, contentKey, new DatabaseEntry(), LockMode.RMW);
- if (status == OperationStatus.NOTFOUND)
- {
- if (localTx)
- {
- tx.abort();
- context.setPayload(null);
- }
-
- throw new AMQException("Content chunk " + i + " not found for message " + messageId);
- }
-
status = _messageContentDb.delete(tx, contentKey);
- if (status == OperationStatus.NOTFOUND)
- {
- if (localTx)
- {
- tx.abort();
- context.setPayload(null);
- }
+ i++;
+ } while (status != OperationStatus.NOTFOUND);
- throw new AMQException("Content chunk " + i + " not found for message " + messageId);
- }
-
- if (_log.isDebugEnabled())
- {
- _log.debug("Deleted content chunk " + i + " for message " + messageId);
- }
- }
-
if (localTx)
{
- // ? Will this not perform the environment default commit? Should we not be doing this async as
+ // Should we not be doing this async as
// remove will only occur when message has been fully dequeued? 2009-03-31
- tx.commit();
+ commit(tx);
context.setPayload(null);
}
}
15 years, 2 months
rhmessaging commits: r3270 - store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb.
by rhmessaging-commits@lists.jboss.org
Author: ritchiem
Date: 2009-04-09 08:11:12 -0400 (Thu, 09 Apr 2009)
New Revision: 3270
Modified:
store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
Log:
RHM-8 : Applied patch from Robert Godfrey with some additional comments
Modified: store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
===================================================================
--- store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2009-04-08 18:33:07 UTC (rev 3269)
+++ store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2009-04-09 12:11:12 UTC (rev 3270)
@@ -500,8 +500,7 @@
_log.debug("Message Id: " + messageId + " Removing");
}
- // first we need to look up the header to get the chunk count
- MessageMetaData mmd = getMessageMetaData(context, messageId);
+ //Remove the MetaData then iterate deleting all the ContentChunks we can for the given messageId
try
{
OperationStatus status = _messageMetaDataDb.delete(tx, key);
@@ -523,45 +522,21 @@
DatabaseEntry contentKey = new DatabaseEntry();
TupleBinding contentKeyBinding = new MessageContentKey.TupleBinding();
- for (int i = 0; i < mmd.getContentChunkCount(); i++)
+ int i = 0;
+
+ do
{
MessageContentKey mck = new MessageContentKey(messageId, i);
contentKeyBinding.objectToEntry(mck, contentKey);
- status = _messageContentDb.get(tx, contentKey, new DatabaseEntry(), LockMode.RMW);
- if (status == OperationStatus.NOTFOUND)
- {
- if (localTx)
- {
- tx.abort();
- context.setPayload(null);
- }
-
- throw new AMQException("Content chunk " + i + " not found for message " + messageId);
- }
-
status = _messageContentDb.delete(tx, contentKey);
- if (status == OperationStatus.NOTFOUND)
- {
- if (localTx)
- {
- tx.abort();
- context.setPayload(null);
- }
+ i++;
+ } while (status != OperationStatus.NOTFOUND);
- throw new AMQException("Content chunk " + i + " not found for message " + messageId);
- }
-
- if (_log.isDebugEnabled())
- {
- _log.debug("Deleted content chunk " + i + " for message " + messageId);
- }
- }
-
if (localTx)
{
- // ? Will this not perform the environment default commit? Should we not be doing this async as
+ // Should we not be doing this async as
// remove will only occur when message has been fully dequeued? 2009-03-31
- tx.commit();
+ commit(tx);
context.setPayload(null);
}
}
15 years, 2 months
rhmessaging commits: r3269 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-08 14:33:07 -0400 (Wed, 08 Apr 2009)
New Revision: 3269
Modified:
mgmt/trunk/cumin/python/cumin/charts.py
mgmt/trunk/cumin/python/cumin/collector.py
mgmt/trunk/cumin/python/cumin/collector.strings
mgmt/trunk/cumin/python/cumin/stat.py
mgmt/trunk/cumin/python/cumin/stat.strings
Log:
Stacked value charts
Modified: mgmt/trunk/cumin/python/cumin/charts.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/charts.py 2009-04-08 18:32:22 UTC (rev 3268)
+++ mgmt/trunk/cumin/python/cumin/charts.py 2009-04-08 18:33:07 UTC (rev 3269)
@@ -258,3 +258,62 @@
def write(self, writer):
self.surface.write_to_png(writer)
+
+class StackedValueChart(TimeSeriesChart):
+ def __init__(self, width, height, legend_height = 0):
+ super(StackedValueChart, self).__init__(width, height)
+
+ if legend_height:
+ self.surface = ImageSurface(FORMAT_ARGB32, width, height + legend_height)
+ self.surface.set_device_offset(1.5, 5.5)
+
+ self.legend_height = legend_height
+ self.bar_width = 2
+
+ def plot_values(self, dt, samples, colors):
+ cr = Context(self.surface)
+ cr.set_line_width(self.bar_width)
+
+ tnow = time()
+ y = self.height
+ v = 0
+ for value, color in zip(samples, colors):
+ if value is None:
+ continue
+
+ t = secs(dt)
+
+ if tnow - t < 0:
+ t = tnow
+
+ x = self.width - ((tnow - t) / float(self.x_max)) * self.width
+ cr.move_to(x, y)
+ cr.set_source_rgba(color[0], color[1], color[2], 0.66)
+
+ v = v + value
+ y = self.height - (v / float(self.y_max)) * self.height
+ cr.line_to(x, y)
+ cr.stroke()
+
+ def plot_legend(self, titles, colors):
+ cr = Context(self.surface)
+
+ for i, item in enumerate(zip(titles, colors)):
+ title, color = item
+ y = self.height + 16 + i * 16
+
+ cr.set_source_rgba(1, 1, 1, 0.75)
+ cr.rectangle(4, y - 12, 16 + 6.5 * len(title), 16)
+ cr.fill()
+ cr.stroke()
+
+ cr.set_source_rgb(*color)
+ cr.rectangle(8, y, 8, -8)
+ cr.fill()
+ cr.stroke()
+
+ cr.move_to(20, y)
+ cr.set_source_rgb(0, 0, 0)
+ cr.show_text(title)
+ cr.stroke()
+
Modified: mgmt/trunk/cumin/python/cumin/collector.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/collector.py 2009-04-08 18:32:22 UTC (rev 3268)
+++ mgmt/trunk/cumin/python/cumin/collector.py 2009-04-08 18:33:07 UTC (rev 3269)
@@ -108,6 +108,23 @@
self.add_mode(view)
self.set_view_mode(view)
+class CollectorStats(Widget):
+ def __init__(self, app, name):
+ super(CollectorStats, self).__init__(app, name)
+
+ self.add_child(StatSet(app, "stats", "general"))
+
+ chart = self.StackedChart(app, "utilization")
+ chart.stats = ("HostsIdle", "HostsClaimed", "HostsUnclaimed")
+ self.add_child(chart)
+
+ def render_title(self, session):
+ return "Statistics"
+
+ class StackedChart(StatStackedChart):
+ def render_title(self, session, *args):
+ return "Slot Utilization"
+
class CollectorView(CuminView):
def __init__(self, app, name):
super(CollectorView, self).__init__(app, name)
@@ -118,6 +135,9 @@
self.__tabs = TabbedModeSet(app, "tabs")
self.add_child(self.__tabs)
+ stats = CollectorStats(app, "stats")
+ self.__tabs.add_tab(stats)
+
details = CuminDetails(app, "details")
self.__tabs.add_tab(details)
Modified: mgmt/trunk/cumin/python/cumin/collector.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/collector.strings 2009-04-08 18:32:22 UTC (rev 3268)
+++ mgmt/trunk/cumin/python/cumin/collector.strings 2009-04-08 18:33:07 UTC (rev 3269)
@@ -38,3 +38,18 @@
<div>{hidden_inputs}</div>
</form>
+
+[CollectorStats.html]
+<table class="twocol">
+ <tbody>
+ <tr>
+ <td>
+ <h2>Collector Stats</h2>
+ {stats}
+ </td>
+ <td>
+ {utilization}
+ </td>
+ </tr>
+ </tbody>
+</table>
Modified: mgmt/trunk/cumin/python/cumin/stat.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.py 2009-04-08 18:32:22 UTC (rev 3268)
+++ mgmt/trunk/cumin/python/cumin/stat.py 2009-04-08 18:33:07 UTC (rev 3269)
@@ -73,7 +73,14 @@
#else:
return stat.rate_html(object)
+class DurationSwitch(StateSwitch):
+ def __init__(self, app, name):
+ super(DurationSwitch, self).__init__(app, name)
+ self.add_state("m", "10 minutes")
+ self.add_state("h", "1 hour")
+ self.add_state("d", "1 day")
+
class StatValueChart(Widget):
def __init__(self, app, name):
super(StatValueChart, self).__init__(app, name)
@@ -112,8 +119,11 @@
if self.mode:
params.append("mode=%s" % self.mode)
- return "stats.png?" + ";".join(params)
+ return "%s?" % self.get_chart_name(session) + ";".join(params)
+ def get_chart_name(self, session):
+ return "stats.png"
+
def render_title(self, session, object):
cls = self.app.model.get_class_by_object(object)
return getattr(cls, self.stats[0]).title
@@ -145,6 +155,40 @@
def render_stat_name(self, session, stat, object):
return stat.name
+ def render_width(self, session, object):
+ return 360
+
+ def render_height(self, session, object):
+ return 100
+
+class StatStackedChart(StatValueChart):
+ def __init__(self, app, name):
+ super(StatStackedChart, self).__init__(app, name)
+
+ self.duration = self.JSDurationSwitch(app, "duration")
+ self.add_child(self.duration)
+
+ def get_chart_name(self, session):
+ return "stacked.png"
+
+ def render_height(self, session, object):
+ return 200
+
+ class JSDurationSwitch(DurationSwitch):
+ def render_item_link(self, session, state):
+ href = "javascript:void(0)"
+
+ title = self.get_title(state)
+ hover = self.get_hover(state)
+ class_ = self.get(session) == state and "selected"
+ duration = 600
+ if state == "h":
+ duration = 3600
+ elif state == "d":
+ duration = 86400
+ click = "stackedDuration('%s', this, %i)" % (state, duration)
+ return fmt_link(href, title, class_, link_title=hover, click=click)
+
class ImageCache(object):
def __init__(self):
self.__files = dict() # {name: {"time": time_created, "file": file object, "cookie": (cookie values)}}
@@ -409,10 +453,102 @@
chart.write(writer)
return writer.to_string()
-class DurationSwitch(StateSwitch):
+from random import *
+class StatStackedPage(StatChartPage):
def __init__(self, app, name):
- super(DurationSwitch, self).__init__(app, name)
+ super(StatStackedPage, self).__init__(app, name)
- self.add_state("m", "10 minutes")
- self.add_state("h", "1 hour")
- self.add_state("d", "1 day")
+ self.container_width = IntegerParameter(app, "width")
+ self.container_width.default = 360
+ self.add_parameter(self.container_width)
+
+ self.container_height = IntegerParameter(app, "height")
+ self.container_height.default = 100
+ self.add_parameter(self.container_height)
+
+ def fake_samples(self, count, t, diff):
+ start = randrange(1, 100)
+
+ return [ (t+timedelta(seconds=-i*diff), start + randrange(-5, 5)) for i in range(0, count) ]
+
+ def do_render(self, session, object):
+ chart = StackedValueChart(self.container_width.get(session), self.container_height.get(session), 100)
+
+ cls = self.class_.get(session)
+ stats = [getattr(cls, x) for x in self.stats.get(session)]
+
+ samples = dict()
+ values = dict()
+
+ duration = self.duration.get(session)
+
+ #XXX fake stats for now
+ count = self.container_width.get(session) / 3
+ t = datetime.now()
+ seed(1)
+ for stat in stats:
+ samples[stat] = self.fake_samples(min(count, 200), t, 10)
+
+ #samples[stat] = stat.samples(object, duration)
+
+ points = dict()
+ for stat in stats:
+ for sample in samples[stat]:
+ t = sample[0]
+ if not t in points:
+ points[t] = list()
+ points[t].append(sample[1])
+
+ for t in points:
+ values[t] = 0
+ for v in points[t]:
+ values[t] = values[t] + v
+
+ max_value = 1
+ min_value = 0
+
+ for t in points:
+ vals = values[t]
+ if vals:
+ max_value = max(nvl(vals, 0), max_value)
+ min_value = min(nvl(vals, 0), min_value)
+
+ max_value = round(max_value * 1.1 + 1)
+
+ if min_value < 0:
+ min_value = round(min_value * 1.1 - 1)
+
+ chart.x_max = duration
+ chart.x_min = 0
+ chart.y_max = max_value
+ chart.y_min = min_value
+
+ x_intervals = 8
+ x_step = 2
+
+ if chart.x_max == 600:
+ x_intervals = 10
+
+ y_intervals = 6
+ y_step = 2
+
+ if chart.y_max < 3:
+ y_step = 3
+
+ chart.plot_x_axis(x_intervals, x_step)
+ chart.plot_y_axis(y_intervals, y_step)
+
+ colors = ((1,0,0), (0,0,1), (0,1,0), (1,0,1), (1,1,0), (0,1,1), (0,0,0))
+
+ for t in points:
+ chart.plot_values(t, points[t], colors)
+
+ chart.plot_frame()
+
+ titles = [x.title for x in stats]
+
+ chart.plot_legend(reversed(titles), reversed(colors[:len(titles)]))
+
+ writer = Writer()
+ chart.write(writer)
+ return writer.to_string()
Modified: mgmt/trunk/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.strings 2009-04-08 18:32:22 UTC (rev 3268)
+++ mgmt/trunk/cumin/python/cumin/stat.strings 2009-04-08 18:33:07 UTC (rev 3269)
@@ -78,7 +78,7 @@
<div class="duration">{duration}</div>
- <img id="{id}" src="{href}" height="100" width="360" alt="stats" />
+ <img id="{id}" src="{href}" height="{height}" width="{width}" alt="stats" />
</div>
<script type="text/javascript">
(function() {
@@ -95,3 +95,58 @@
<span class="swatch" style="background-color: {stat_color}"> </span>
<span class="ph" statname="{stat_name}" statmode="{mode}">{stat_value}</span>
</li>
+
+[StatStackedChart.html]
+<div class="StatValueChart fullpageable" id="{id}">
+ <h2>{title}</h2>
+
+ <div class="duration">{duration}</div>
+
+ <img id="{id}" src="{href}" alt="Stacked Value Chart" />
+</div>
+<script type="text/javascript">
+//<![CDATA[
+(function() {
+ function update() {
+ cumin.updateChart("{id}");
+ }
+
+ wooly.addPageUpdateListener(update);
+}())
+function stackedNotify(full, width, height) {
+ var oImg = document.images['{id}'];
+ if (oImg) {
+ var src = oImg.src;
+ var branch = wooly.session.branch(src);
+ branch.width = Math.max(width - 100, 360);
+ branch.height = Math.max(height - 100, 100);
+ src = branch.marshal();
+
+ src = cumin.refreshTime(src);
+ oImg.style.visibility = "hidden"
+ oImg.src = src;
+ }
+}
+function stackedDuration(state, a, duration) {
+ li = a.parentNode;
+ ul = li.parentNode;
+ as = ul.getElementsByTagName('a');
+ for (var i=0; i < as.length; i++) {
+ as[i].className = (as[i].firstChild.nodeValue.indexOf(state) != -1) ? "selected" : "";
+ }
+ var oImg = document.images['{id}'];
+ if (oImg) {
+ var src = oImg.src;
+ var branch = wooly.session.branch(src);
+ branch.duration = duration;
+ src = branch.marshal();
+ src = cumin.refreshTime(src);
+ oImg.src = src;
+ }
+}
+ $('{id}').onfullpage = function (width, height) { stackedNotify(true, width, height); };
+ $('{id}').onrestore = function () { stackedNotify(false, {width}, 100); };
+ document.images['{id}'].onload = function () {this.style.visibility = "visible"};
+ document.images['{id}'].ondblclick = function () {fullpage(this.parentNode.parentNode.parentNode.getElementsByTagName('p')[0])};
+//]]>
+</script>
15 years, 2 months
rhmessaging commits: r3268 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-08 14:32:22 -0400 (Wed, 08 Apr 2009)
New Revision: 3268
Modified:
mgmt/trunk/cumin/python/cumin/__init__.py
Log:
Added Page for stacked value charts
Modified: mgmt/trunk/cumin/python/cumin/__init__.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/__init__.py 2009-04-08 13:34:40 UTC (rev 3267)
+++ mgmt/trunk/cumin/python/cumin/__init__.py 2009-04-08 18:32:22 UTC (rev 3268)
@@ -15,7 +15,7 @@
from model import CuminModel, ModelPage, CallPage
from demo import DemoData
from page import MainPage
-from stat import StatChartPage, SlotMapPage
+from stat import StatChartPage, StatStackedPage, SlotMapPage
from action import ActionPage
from user import LoginPage, UserSession, UserSessionExpireThread
from datetime import timedelta
@@ -50,6 +50,7 @@
self.add_page(CallPage(self, "call.xml"))
self.add_page(ActionPage(self, "actions.html"))
self.add_page(StatChartPage(self, "stats.png"))
+ self.add_page(StatStackedPage(self, "stacked.png"))
self.add_page(SlotMapPage(self, "slots.png"))
unprotected = set()
15 years, 2 months
rhmessaging commits: r3267 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-08 09:34:40 -0400 (Wed, 08 Apr 2009)
New Revision: 3267
Modified:
mgmt/trunk/cumin/resources/app.js
Log:
Also pass the container's height to the fullpage notify javascript function.
Modified: mgmt/trunk/cumin/resources/app.js
===================================================================
--- mgmt/trunk/cumin/resources/app.js 2009-04-08 13:33:08 UTC (rev 3266)
+++ mgmt/trunk/cumin/resources/app.js 2009-04-08 13:34:40 UTC (rev 3267)
@@ -131,7 +131,8 @@
oFullPage.getElement("p.fullpageIcon").setProperty("title", "Restore");
setFullpageParam(true, oFullPage);
var onfullpage = oFullPage.onfullpage;
- if (onfullpage) onfullpage($(oFullPage).getCoordinates().width);
+ var coords = $(oFullPage).getCoordinates();
+ if (onfullpage) onfullpage(coords.width, coords.height);
}
}
15 years, 2 months
rhmessaging commits: r3266 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-08 09:33:08 -0400 (Wed, 08 Apr 2009)
New Revision: 3266
Modified:
mgmt/trunk/cumin/python/cumin/model.py
Log:
Master schema no longer has nodeName. In now uses Name.
Added some stats on Collector
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2009-04-03 20:17:47 UTC (rev 3265)
+++ mgmt/trunk/cumin/python/cumin/model.py 2009-04-08 13:33:08 UTC (rev 3266)
@@ -734,7 +734,7 @@
return self.model.frame.system.show_object(session, system)
def get_object_name(self, object):
- return object.nodeName
+ return object.Name
class Start(CuminAction):
def do_invoke(self, object, args, completion):
@@ -2682,6 +2682,18 @@
action = GetStartedAction(self, "GetStarted")
action.navigable = False
+ stat = CuminStat(self, "HostsClaimed")
+ stat.title = "Claimed Slots"
+
+ stat = CuminStat(self, "HostsUnclaimed")
+ stat.title = "Unclaimed Slots"
+
+ stat = CuminStat(self, "HostsIdle")
+ stat.title = "Idle Slots"
+
+ stat = CuminStat(self, "HostsTotal")
+ stat.title = "Total Slots"
+
def init(self):
self.frame = self.model.frame.pool.collector
15 years, 2 months
rhmessaging commits: r3265 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-04-03 16:17:47 -0400 (Fri, 03 Apr 2009)
New Revision: 3265
Modified:
mgmt/trunk/cumin/python/cumin/visualizations.strings
Log:
Job related fixes
Modified: mgmt/trunk/cumin/python/cumin/visualizations.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-04-03 18:21:45 UTC (rev 3264)
+++ mgmt/trunk/cumin/python/cumin/visualizations.strings 2009-04-03 20:17:47 UTC (rev 3265)
@@ -188,7 +188,7 @@
this.zoom_in_slots = function (posxy) {
if (slot_zoom >= get_max_zoom()) return;
- var click_info = get_index(posxy.x, posxy.y);
+ var click_info = vis.get_index(posxy.x, posxy.y);
slot_center_index = click_info.index;
do_zoom(slot_zoom + 1);
}
@@ -199,6 +199,18 @@
do_info_request(index);
}
+ this.get_index = function (x, y) {
+ var width = slot_map_info.size;
+ var pngrow = Math.floor((y - slot_clip_top) / width);
+ var pngcol = Math.floor((x - slot_clip_left) / width);
+ if ((pngcol < slot_map_info.cols) && (pngrow < slot_map_info.rows)) {
+ var index = pngrow * slot_map_info.cols + pngcol;
+ if (index < slot_map_info.count)
+ return {"index": index, "row": pngrow, "col": pngcol};
+ }
+ return null;
+ }
+
}
function slot_zoom_to(e) {
@@ -467,28 +479,15 @@
}
function hide_info() {
- oInfo = get_slot_info_elem();
+ oInfo = $(slot_info_id);
if (oInfo) {
oInfo.style.visibility = "hidden";
}
slot_last_index = -1;
}
- function get_index(x, y) {
- var width = slot_map_info.size;
- var pngrow = Math.floor((y - slot_clip_top) / width);
- var pngcol = Math.floor((x - slot_clip_left) / width);
- if ((pngcol < slot_map_info.cols) && (pngrow < slot_map_info.rows)) {
- var index = pngrow * slot_map_info.cols + pngcol;
- if (index < slot_map_info.count)
- return {"index": index, "row": pngrow, "col": pngcol};
- }
- return null;
- }
-
function get_slot_info(rx, ry) {
-
- var click_info = get_index(rx, ry);
+ var click_info = vis.get_index(rx, ry);
if (click_info) {
if (click_info.index != slot_last_index) {
if (slot_info_timer) {
@@ -501,7 +500,7 @@
}
slot_info_timer = setTimeout( function() { vis.fire_slot_info(click_info.index) }, 500);
animate_hover(0, click_info.row, click_info.col);
- oInfo = get_slot_info_elem();
+ oInfo = $(slot_info_id);
if (oInfo) {
oInfo.style.display = "none";
}
@@ -554,10 +553,6 @@
}
}
- function get_slot_info_elem() {
- return document.getElementById(slot_info_id);
- }
-
function refire_info() {
if (slot_last_index > -1) {
do_info_request(slot_last_index)
@@ -573,7 +568,7 @@
function got_slot_info(xhtml, args) {
if (slot_last_index == -1) return;
- var oInfo = get_slot_info_elem();
+ var oInfo = $(slot_info_id);
var for_jid = null;
if (oInfo) {
oInfo.style.display = "none";
@@ -583,7 +578,7 @@
}
}
wooly.updatePage(xhtml);
- var oInfo = get_slot_info_elem();
+ var oInfo = $(slot_info_id);
if (oInfo) {
oInfo.click_index = args.index;
oInfo.for_jid = null;
@@ -615,13 +610,13 @@
// position popup above clicked slot
top = (abs_pos.y + y) - oInfo.offsetHeight - Math.floor(slot_map_info.size * .5);
}
-
+
// if off the top of the page
if (top < 0) {
// revert to under the item
top = topUnder;
}
-
+
oInfo.style.top = top + "px";
oInfo.style.left = abs_pos.x + "px";
}
@@ -650,10 +645,10 @@
if (hadDoubleClick()) return false;
// Otherwise set timer to act. It may be preempted by a doubleclick.
d = new Date();
- this.click_when = d.getTime();
+ clicks.click_when = d.getTime();
var rpos = get_relative_event_pos(e);
if (rpos) {
- this.click_handle = setTimeout( function() {clicks.doClick(rpos.x, rpos.y)}, 250);
+ clicks.click_handle = setTimeout( function() {clicks.doClick(rpos.x, rpos.y)}, 250);
break;
}
case "dblclick":
@@ -675,8 +670,8 @@
return false;
}
}
- var click_info = get_index(x, y);
- var oInfo = get_slot_info_elem();
+ var click_info = vis.get_index(x, y);
+ var oInfo = $(slot_info_id);
if (oInfo && click_info) {
if ((typeof oInfo.click_index != "undefined") &&
(oInfo.click_index == click_info.index)) {
15 years, 3 months
rhmessaging commits: r3264 - store/branches/java/0.5-release/bdbstore/etc/scripts.
by rhmessaging-commits@lists.jboss.org
Author: ritchiem
Date: 2009-04-03 14:21:45 -0400 (Fri, 03 Apr 2009)
New Revision: 3264
Modified:
store/branches/java/0.5-release/bdbstore/etc/scripts/bdbtest.sh
Log:
Restored patch from trunk : Update BDBTest Script to use qpid-run. Merged from r3262
Modified: store/branches/java/0.5-release/bdbstore/etc/scripts/bdbtest.sh
===================================================================
--- store/branches/java/0.5-release/bdbstore/etc/scripts/bdbtest.sh 2009-04-03 18:20:09 UTC (rev 3263)
+++ store/branches/java/0.5-release/bdbstore/etc/scripts/bdbtest.sh 2009-04-03 18:21:45 UTC (rev 3264)
@@ -1,5 +1,28 @@
#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+if [ -z "$QPID_HOME" ]; then
+ export QPID_HOME=$(dirname $(dirname $(readlink -f $0)))
+ export PATH=${PATH}:${QPID_HOME}/bin
+fi
+
# Parse arguements taking all - prefixed args as JAVA_OPTS
for arg in "$@"; do
if [[ $arg == -java:* ]]; then
@@ -9,4 +32,12 @@
fi
done
-java -Xms256m -Dlog4j.configuration=perftests.log4j -Xmx256m -Dbadger.level=warn -Damqj.test.logging.level=warn -Damqj.logging.level=warn ${JAVA_OPTS} -cp qpid-bdbstore-1.0-incubating-M2-SNAPSHOT-all-test-deps.jar org.apache.qpid.ping.PingDurableClient -o $QPID_WORK/results ${ARGS}
+VERSION=0.5
+
+# Set classpath to include Qpid jar with all required jars in manifest
+QPID_LIBS=$QPID_HOME/lib/qpid-all.jar:$QPID_HOME/lib/qpid-junit-toolkit-$VERSION.jar:$QPID_HOME/lib/junit-3.8.1.jar:$QPID_HOME/lib/log4j-1.2.12.jar:$QPID_HOME/lib/qpid-perftests-$VERSION.jar:$QPID_HOME/lib/slf4j-log4j12-1.4.0.jar
+
+# Set other variables used by the qpid-run script before calling
+export JAVA=java JAVA_MEM=-Xmx256m QPID_CLASSPATH=$QPID_LIBS
+
+. qpid-run -Dlog4j.configuration=perftests.log4j -Dbadger.level=warn -Damqj.test.logging.level=warn -Damqj.logging.level=warn ${JAVA_OPTS} org.apache.qpid.ping.PingDurableClient -o $QPID_WORK/results ${ARGS}
15 years, 3 months