rhmessaging commits: r4388 - mgmt/trunk/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-10-15 11:46:31 -0400 (Fri, 15 Oct 2010)
New Revision: 4388
Modified:
mgmt/trunk/mint/python/mint/update.py
Log:
Improved dropped update handling
Modified: mgmt/trunk/mint/python/mint/update.py
===================================================================
--- mgmt/trunk/mint/python/mint/update.py 2010-10-15 14:49:44 UTC (rev 4387)
+++ mgmt/trunk/mint/python/mint/update.py 2010-10-15 15:46:31 UTC (rev 4388)
@@ -187,9 +187,11 @@
self.do_process(thread.cursor, thread.stats)
thread.conn.commit()
+ except UpdateDropped:
+ log.debug("Update dropped")
- # XXX UpdateCommitted
- except UpdateDropped:
+ thread.conn.rollback()
+
thread.stats.dropped += 1
except:
log.exception("Update failed")
14 years, 2 months
rhmessaging commits: r4387 - mgmt/trunk/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-10-15 10:49:44 -0400 (Fri, 15 Oct 2010)
New Revision: 4387
Modified:
mgmt/trunk/mint/python/mint/update.py
Log:
For bz 643384, fix unexpected exception path in Update.process
Modified: mgmt/trunk/mint/python/mint/update.py
===================================================================
--- mgmt/trunk/mint/python/mint/update.py 2010-10-15 12:38:27 UTC (rev 4386)
+++ mgmt/trunk/mint/python/mint/update.py 2010-10-15 14:49:44 UTC (rev 4387)
@@ -191,10 +191,6 @@
# XXX UpdateCommitted
except UpdateDropped:
thread.stats.dropped += 1
- except UpdateException, e:
- log.exception("Update could not be completed")
-
- thread.conn.rollback()
except:
log.exception("Update failed")
14 years, 2 months
rhmessaging commits: r4386 - store/trunk/cpp/lib.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2010-10-15 08:38:27 -0400 (Fri, 15 Oct 2010)
New Revision: 4386
Modified:
store/trunk/cpp/lib/MessageStoreImpl.cpp
Log:
Fix for unqualified use of string, ie changing string to std::string fixes compile error
Modified: store/trunk/cpp/lib/MessageStoreImpl.cpp
===================================================================
--- store/trunk/cpp/lib/MessageStoreImpl.cpp 2010-10-13 19:02:45 UTC (rev 4385)
+++ store/trunk/cpp/lib/MessageStoreImpl.cpp 2010-10-15 12:38:27 UTC (rev 4386)
@@ -417,7 +417,7 @@
std::ostringstream oss;
oss << storeDir << "/" << storeTopLevelDir;
if (saveStoreContent) {
- string dir = mrg::journal::jdir::push_down(storeDir, storeTopLevelDir, "cluster");
+ std::string dir = mrg::journal::jdir::push_down(storeDir, storeTopLevelDir, "cluster");
QPID_LOG(notice, "Store directory " << oss.str() << " was pushed down (saved) into directory " << dir << ".");
} else {
mrg::journal::jdir::delete_dir(oss.str().c_str());
14 years, 2 months
rhmessaging commits: r4385 - in mgmt/trunk/cumin: resources and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-10-13 15:02:45 -0400 (Wed, 13 Oct 2010)
New Revision: 4385
Modified:
mgmt/trunk/cumin/python/cumin/stat.py
mgmt/trunk/cumin/resources/open-flash-chart.swf
Log:
BZ 639349 and 630881
- no longer passing in x value for charts. The action script code calculates the x value based on the date/time of the sample.
- no longer passing in uid. The action script code now uses the date/time of the sample for a unique id
- for full page graphs, don't draw the area between data points if there was no data for more than 10 minutes
Modified: mgmt/trunk/cumin/python/cumin/stat.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.py 2010-10-11 20:53:16 UTC (rev 4384)
+++ mgmt/trunk/cumin/python/cumin/stat.py 2010-10-13 19:02:45 UTC (rev 4385)
@@ -779,8 +779,8 @@
else:
append = True
- for sample, stat in zip(samples, stats):
- log.debug("samples in %s: %d" % (stat.name, len(samples[sample])))
+ #for sample, stat in zip(samples, stats):
+ # log.debug("samples in %s: %d" % (stat.name, len(samples[sample])))
# create the chart dict
chart = self.get_chart(session, adapter, stats, samples, time_span, max_value, min_value, append, end_seconds_ago)
@@ -860,7 +860,7 @@
samples = dict()
if mode == "rate":
for stat in stats:
- os = adapter.samples(stat, dur, interval, method, secs2=end_seconds_ago, delta=delta)
+ os = adapter.samples(stat, dur+600, interval, method, secs2=end_seconds_ago, delta=delta)
ns = list()
prev = None
@@ -876,7 +876,8 @@
samples[stat] = ns
else:
for stat in stats:
- samples[stat] = adapter.samples(stat, dur, interval, method, secs2=end_seconds_ago, delta=delta)
+ # get more samples than needed to allow chart to clip correctly
+ samples[stat] = adapter.samples(stat, dur+600, interval, method, secs2=end_seconds_ago, delta=delta)
return samples
@@ -900,12 +901,16 @@
def get_vals(self, session, samples, stat, text, duration, end_secs):
tnow = time()
- vals = [{"x":int(duration -(tnow - secs(dt)) + end_secs),
- "y":value,
- "uid": dt.strftime("%m%d%Y%H%M%S")}
- #"tip": "<br>%s: #val#<br>Time: %s" % (text, dt.strftime("%m/%d/%Y %H:%M:%S"))
- for dt, value, dev in reversed(samples[stat])
- if value is not None]
+ vals = list()
+
+ min_dt = tnow - duration - end_secs
+ for dt, value, dev in samples[stat]:
+ if value is not None:
+ vals.append({"dt": secs(dt), "y": value})
+ if secs(dt) < min_dt:
+ break
+
+ vals.reverse()
return vals
def make_chart_lines(self, session, chart, line_type, stats, dot_size, halo_size, line_width, samples, duration, end_secs, mode):
@@ -946,6 +951,10 @@
id = id.encode('ascii', 'replace')
chart.id = id
chart.bg_colour = "#FFFFFF"
+ chart.tnow = time()
+ chart.duration = duration
+ chart.end_secs = end_secs
+
self.make_chart_lines(session, chart, "area", stats, dot_size, halo_size, line_width, samples, duration, end_secs, mode)
if append:
@@ -972,19 +981,40 @@
chart.control.x_axis = XAxis().get_x_axis(self.one_day, 0, tick_height=10)
chart.control.x_axis.labels.colour = "#333333"
chart.control.x_axis.grid_colour = "#FFFFFF"
- samples = self.fetch_samples(adapter, self.one_day, 60, "avg", mode, False, stats, end_seconds_ago=0)
+ samples = self.fetch_samples(adapter, self.one_day, 180, "avg", mode, False, stats, end_seconds_ago=0)
+ self.add_control_points(session, stats, samples)
max_value, min_value = self.get_max_min(session, stats, samples)
- self.make_chart_lines(session, chart.control, "line", stats, 1, 0, 1, samples, self.one_day, 0, mode)
+ self.make_chart_lines(session, chart.control, "area", stats, 1, 0, 0, samples, self.one_day, 0, mode)
chart.control.y_min = max(min_value, 0)
chart.control.y_max = max(max_value-2, 1)
chart.control.slider_low.value = float(self.page.control_min.get(session))
chart.control.slider_low.colour = "#666666"
chart.control.slider_high.value = float(self.page.control_max.get(session))
chart.control.slider_high.colour = "#666666"
+ chart.control.tnow = time()
+ chart.control.duration = self.one_day
+ chart.control.end_secs = 0
#print "sending entire sample set with y_axis.max=%i" % chart.y_axis["max"]
return chart
+ def add_control_points(self, session, stats, samples):
+ new_samples = list()
+ threshold = timedelta(minutes=10)
+ for stat in stats:
+ last_dt = None
+ last_val = 0
+ for dt, value, dev in samples[stat]:
+ if last_dt and last_dt - dt > threshold:
+ if last_val:
+ new_samples.append((last_dt, 0, 0))
+ if value:
+ new_samples.append((dt, 0, 0))
+ last_dt = dt
+ last_val = value
+ new_samples.append((dt, value, dev))
+ samples[stat] = new_samples
+
class StackedAreaChart(AreaChart):
colors = ('#FFABAB', '#ABABFF', '#ABFFAB', '#FFABFF', '#FFFFAB', '#ABFFFF', '#ABABAB')
def __init__(self, app, name, page):
@@ -1005,21 +1035,27 @@
for stat in stats:
last_dt = None
for dt, value, dev in samples[stat]:
- if dt == last_dt:
- continue
if value == None:
value = 0
- last_dt = dt
if stat not in points:
points[stat] = list()
if dt not in totals:
totals[dt] = 0
- totals[dt] += value
- points[stat].append((dt, value, totals[dt]))
- max_value = max(totals[dt], max_value)
- min_value = min(totals[dt], min_value)
+ if dt == last_dt:
+ if (totals[dt] > 0) and value > 0:
+ continue
+ points[stat].append((dt, 0, 0))
+ else:
+ last_dt = dt
+ totals[dt] += value
+ points[stat].append((dt, value, totals[dt]))
+
+ max_value = max(totals[dt], max_value)
+ min_value = min(totals[dt], min_value)
+
+
# save the accumulated values for each timestamp
self.points.set(session, points)
@@ -1031,29 +1067,20 @@
def get_vals(self, session, samples, stat, text, duration, end_secs):
tnow = time()
+ vals = list()
points = self.points.get(session)
- values = list()
if points:
- vals = [{"x":int(duration -(tnow - secs(dt)) + end_secs),
- "y":stacked_value,
- "uid": dt.strftime("%m%d%Y%H%M%S")}
- #"tip": "<br>%s: %s<br>Time: %s" % (text, str(value), dt.strftime("%m/%d/%Y %H:%M:%S"))}
- for dt, value, stacked_value in reversed(points[stat])
- if value is not None]
+ min_dt = tnow - duration - end_secs
+ for dt, value, stacked_value in points[stat]:
+ if value is not None:
+ vals.append({"dt": secs(dt), "y": stacked_value})
+ if secs(dt) < min_dt:
+ break
- log.debug("number of points before culling: %d" % len(vals))
- # allow only 1 value that has a -x
- first_positive = 0
- for i in range(len(vals)):
- if vals[i]['x'] >= 0:
- first_positive = i
- break
- values = [vals[i] for i in range(len(vals)) if i >= first_positive - 1]
- log.debug("number of points after culling: %d" % len(values))
+ vals.reverse()
+ return vals
- return values
-
class Points(Attribute):
def get_default(self, session):
return dict()
Modified: mgmt/trunk/cumin/resources/open-flash-chart.swf
===================================================================
(Binary files differ)
14 years, 2 months
rhmessaging commits: r4384 - in mgmt/trunk/cumin: resources and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-10-11 16:53:16 -0400 (Mon, 11 Oct 2010)
New Revision: 4384
Modified:
mgmt/trunk/cumin/python/cumin/stat.py
mgmt/trunk/cumin/resources/open-flash-chart.swf
Log:
BZ 639349: Optimize json data send to flash charts
- Removed the tip text for each point. Now constructing tips in the .swf based on uid
- using ints instead of floats for alpha
Modified: mgmt/trunk/cumin/python/cumin/stat.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.py 2010-10-08 20:52:47 UTC (rev 4383)
+++ mgmt/trunk/cumin/python/cumin/stat.py 2010-10-11 20:53:16 UTC (rev 4384)
@@ -623,7 +623,7 @@
chart.elements = list()
element = Element()
element.type = "pie"
- element.alpha = 0.7
+ element.alpha = 7
element.start_angle = 0
element.gradient_fill = True
element.radius = 90
@@ -854,7 +854,7 @@
def __init__(self, app, name, page):
super(AreaChart, self).__init__(app, name, page)
- self.alpha = 0.3
+ self.alpha = 3
def fetch_samples(self, adapter, dur, interval, method, mode, delta, stats, end_seconds_ago=0):
samples = dict()
@@ -902,8 +902,8 @@
tnow = time()
vals = [{"x":int(duration -(tnow - secs(dt)) + end_secs),
"y":value,
- "uid": dt.strftime("%m%d%Y%H%M%S"),
- "tip": "<br>%s: #val#<br>Time: %s" % (text, dt.strftime("%m/%d/%Y %H:%M:%S"))}
+ "uid": dt.strftime("%m%d%Y%H%M%S")}
+ #"tip": "<br>%s: #val#<br>Time: %s" % (text, dt.strftime("%m/%d/%Y %H:%M:%S"))
for dt, value, dev in reversed(samples[stat])
if value is not None]
return vals
@@ -922,7 +922,8 @@
"halo-size": halo_size}
line.colour = color
line.width = line_width
- line.text = mode == "rate" and "%s / sec" % stat.title or stat.title
+ tip_title = stat.title.split(" ")[-1]
+ line.text = mode == "rate" and "%s / sec" % tip_title or stat.title
vals = self.get_vals(session, samples, stat, line.text, duration, end_secs)
line.values = vals
@@ -985,13 +986,14 @@
return chart
class StackedAreaChart(AreaChart):
+ colors = ('#FFABAB', '#ABABFF', '#ABFFAB', '#FFABFF', '#FFFFAB', '#ABFFFF', '#ABABAB')
def __init__(self, app, name, page):
super(StackedAreaChart, self).__init__(app, name, page)
self.points = self.Points(app, "points")
self.add_attribute(self.points)
- #self.alpha = 1
+ self.alpha = 1
def get_max_min(self, session, stats, samples):
max_value = 0
@@ -1035,8 +1037,8 @@
if points:
vals = [{"x":int(duration -(tnow - secs(dt)) + end_secs),
"y":stacked_value,
- "uid": dt.strftime("%m%d%Y%H%M%S"),
- "tip": "<br>%s: %s<br>Time: %s" % (text, str(value), dt.strftime("%m/%d/%Y %H:%M:%S"))}
+ "uid": dt.strftime("%m%d%Y%H%M%S")}
+ #"tip": "<br>%s: %s<br>Time: %s" % (text, str(value), dt.strftime("%m/%d/%Y %H:%M:%S"))}
for dt, value, stacked_value in reversed(points[stat])
if value is not None]
Modified: mgmt/trunk/cumin/resources/open-flash-chart.swf
===================================================================
(Binary files differ)
14 years, 2 months
rhmessaging commits: r4383 - in mgmt/trunk: wooly/python/wooly and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-10-08 16:52:47 -0400 (Fri, 08 Oct 2010)
New Revision: 4383
Modified:
mgmt/trunk/cumin/python/cumin/messaging/binding.py
mgmt/trunk/wooly/python/wooly/__init__.py
mgmt/trunk/wooly/python/wooly/demo.py
mgmt/trunk/wooly/python/wooly/pages.py
mgmt/trunk/wooly/python/wooly/resources.py
mgmt/trunk/wooly/python/wooly/util.py
Log:
Move StringCatalog to wooly.util
Modified: mgmt/trunk/cumin/python/cumin/messaging/binding.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/messaging/binding.py 2010-10-08 20:20:00 UTC (rev 4382)
+++ mgmt/trunk/cumin/python/cumin/messaging/binding.py 2010-10-08 20:52:47 UTC (rev 4383)
@@ -3,7 +3,6 @@
from wooly import WidgetTemplate, Writer, Attribute, Parameter, Widget
from wooly.forms import FormInput, FormField, Form
from wooly.parameters import DictParameter
-from wooly.resources import StringCatalog
from cumin.formats import *
from cumin.objectselector import *
from cumin.sqladapter import *
Modified: mgmt/trunk/wooly/python/wooly/__init__.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/__init__.py 2010-10-08 20:20:00 UTC (rev 4382)
+++ mgmt/trunk/wooly/python/wooly/__init__.py 2010-10-08 20:52:47 UTC (rev 4383)
@@ -1,5 +1,5 @@
from profile import *
-from resources import ResourceFinder, StringCatalog
+from resources import ResourceFinder
from template import *
from util import *
Modified: mgmt/trunk/wooly/python/wooly/demo.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/demo.py 2010-10-08 20:20:00 UTC (rev 4382)
+++ mgmt/trunk/wooly/python/wooly/demo.py 2010-10-08 20:52:47 UTC (rev 4383)
@@ -1,6 +1,5 @@
from forms import *
from pages import HtmlPage
-from resources import StringCatalog
from server import WebServer
from util import *
from widgets import *
Modified: mgmt/trunk/wooly/python/wooly/pages.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/pages.py 2010-10-08 20:20:00 UTC (rev 4382)
+++ mgmt/trunk/wooly/python/wooly/pages.py 2010-10-08 20:52:47 UTC (rev 4383)
@@ -1,5 +1,4 @@
from parameters import ListParameter
-from resources import StringCatalog
from util import *
from widgets import ItemSet
from wooly import *
Modified: mgmt/trunk/wooly/python/wooly/resources.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/resources.py 2010-10-08 20:20:00 UTC (rev 4382)
+++ mgmt/trunk/wooly/python/wooly/resources.py 2010-10-08 20:52:47 UTC (rev 4383)
@@ -1,55 +1,6 @@
import os
import wooly
-class StringCatalog(object):
- def __init__(self, file):
- self.strings = None
- self.path = os.path.splitext(file)[0] + ".strings"
-
- def clear(self):
- self.strings = None
-
- def load(self):
- file = open(self.path)
- try:
- self.strings = parse_catalog_file(file)
- finally:
- file.close()
-
- def get(self, key):
- if not self.strings:
- self.load()
-
- return self.strings.get(key)
-
- def __repr__(self):
- return "%s('%s')" % (self.__class__.__name__, self.path)
-
-def parse_catalog_file(file):
- strings = dict()
- key = None
- writer = wooly.Writer()
-
- for line in file:
- line = line.rstrip()
-
- if line.startswith("[") and line.endswith("]"):
- if key:
- strings[key] = writer.to_string().strip()
-
- writer = wooly.Writer()
-
- key = line[1:-1]
-
- continue
-
- writer.write(line)
- writer.write("\r\n")
-
- strings[key] = writer.to_string().strip()
-
- return strings
-
class ResourceFinder(object):
def __init__(self):
self.dirs = list()
Modified: mgmt/trunk/wooly/python/wooly/util.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/util.py 2010-10-08 20:20:00 UTC (rev 4382)
+++ mgmt/trunk/wooly/python/wooly/util.py 2010-10-08 20:52:47 UTC (rev 4383)
@@ -25,20 +25,6 @@
return "%08x-%08x-%08x-%08x" % (bits0, bits1, bits2, bits3)
-class Writer(object):
- def __init__(self):
- self.writer = StringIO()
-
- def write(self, string):
- self.writer.write(string)
-
- def to_string(self):
- string = self.writer.getvalue()
-
- self.writer.close()
-
- return string
-
def escape_amp(string):
return str(string).replace("&", "&")
@@ -55,3 +41,67 @@
else:
t += i
return t
+
+class Writer(object):
+ def __init__(self):
+ self.writer = StringIO()
+
+ def write(self, string):
+ self.writer.write(string)
+
+ def to_string(self):
+ string = self.writer.getvalue()
+
+ self.writer.close()
+
+ return string
+
+class StringCatalog(object):
+ def __init__(self, file):
+ self.strings = None
+ self.path = os.path.splitext(file)[0] + ".strings"
+
+ def clear(self):
+ self.strings = None
+
+ def load(self):
+ file = open(self.path)
+ try:
+ self.strings = self.parse_catalog_file(file)
+ finally:
+ file.close()
+
+ def parse_catalog_file(self, file):
+ strings = dict()
+ key = None
+ writer = Writer()
+
+ for line in file:
+ line = line.rstrip()
+
+ if line.startswith("[") and line.endswith("]"):
+ if key:
+ strings[key] = writer.to_string().strip()
+
+ writer = Writer()
+
+ key = line[1:-1]
+
+ continue
+
+ writer.write(line)
+ writer.write("\r\n")
+
+ strings[key] = writer.to_string().strip()
+
+ return strings
+
+ def get(self, key):
+ if not self.strings:
+ self.load()
+
+ return self.strings.get(key)
+
+ def __repr__(self):
+ return "%s('%s')" % (self.__class__.__name__, self.path)
+
14 years, 2 months
rhmessaging commits: r4382 - in mgmt/trunk: cumin/instance/log and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-10-08 16:20:00 -0400 (Fri, 08 Oct 2010)
New Revision: 4382
Modified:
mgmt/trunk/
mgmt/trunk/cumin/instance/log/
Log:
Svn ignore log files and TAGS; don't for the Profile symlink, since that didn't have the effect I intended
Property changes on: mgmt/trunk
___________________________________________________________________
Name: svn:ignore
- Profile
+ TAGS
Property changes on: mgmt/trunk/cumin/instance/log
___________________________________________________________________
Name: svn:ignore
+ *.log
14 years, 2 months
rhmessaging commits: r4381 - mgmt/trunk.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-10-08 16:14:47 -0400 (Fri, 08 Oct 2010)
New Revision: 4381
Modified:
mgmt/trunk/Makefile
Log:
Remove an obsolete make rule; add clean to the help text
Modified: mgmt/trunk/Makefile
===================================================================
--- mgmt/trunk/Makefile 2010-10-08 20:09:41 UTC (rev 4380)
+++ mgmt/trunk/Makefile 2010-10-08 20:14:47 UTC (rev 4381)
@@ -1,23 +1,18 @@
-.PHONY: help tags check-devel-env clean
+.PHONY: help tags clean
-version := 0.1.$(shell svn info | fgrep "Revision:" | cut -d " " -f 2)
+# version := 0.1.$(shell svn info | fgrep "Revision:" | cut -d " " -f 2)
help:
@echo "Targets:"
@echo " help Print this message"
+ @echo " clean Remove build artifacts"
@echo " tags Rebuild the tag index"
-tags: check-devel-env
+tags:
find -name \*.py -print | etags -
find -name \*.strings -print \
| etags --append --regex='/^\[.*\][ \t]*$$/\1/' -
-check-devel-env:
- @if test -z "${DEVEL_HOME}"; then \
- echo "DEVEL_HOME is not set; you need to source etc/devel.profile"; \
- exit 1; \
- fi
-
clean:
$(MAKE) clean -C parsley
$(MAKE) clean -C wooly
14 years, 2 months
rhmessaging commits: r4380 - mgmt/trunk.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-10-08 16:09:41 -0400 (Fri, 08 Oct 2010)
New Revision: 4380
Modified:
mgmt/trunk/Makefile
Log:
Change the make tags rule to target the standard filename, TAGS
Modified: mgmt/trunk/Makefile
===================================================================
--- mgmt/trunk/Makefile 2010-10-08 19:43:07 UTC (rev 4379)
+++ mgmt/trunk/Makefile 2010-10-08 20:09:41 UTC (rev 4380)
@@ -8,11 +8,9 @@
@echo " tags Rebuild the tag index"
tags: check-devel-env
- find -name \*.py -print \
- | etags --output="etc/devel.tags" -
+ find -name \*.py -print | etags -
find -name \*.strings -print \
- | etags --append --output="etc/devel.tags" \
- --regex='/^\[.*\][ \t]*$$/\1/' -
+ | etags --append --regex='/^\[.*\][ \t]*$$/\1/' -
check-devel-env:
@if test -z "${DEVEL_HOME}"; then \
14 years, 2 months