aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils/xcalendar/pkg-descr
diff options
context:
space:
mode:
Diffstat (limited to 'deskutils/xcalendar/pkg-descr')
-rw-r--r--deskutils/xcalendar/pkg-descr4
1 files changed, 2 insertions, 2 deletions
diff --git a/deskutils/xcalendar/pkg-descr b/deskutils/xcalendar/pkg-descr
index 3797506c4c7e..704b436a64c9 100644
--- a/deskutils/xcalendar/pkg-descr
+++ b/deskutils/xcalendar/pkg-descr
@@ -5,8 +5,8 @@ Just type `xcalendar [month [year]]' on command line.
If month and year are not provided on the command line they are
assumed to be current.
-Note: This program is internationarized but only
-app-defaults files for English (C) and Japanese (ja_JP.EUC) are included.
+Note: This program is internationalized but only
+app-defaults files for English (C) and Japanese (ja_JP.eucJP) are included.
Let's add another locales!
MITA Yoshio <mita@jp.FreeBSD.org>
g]interface{})
+ metrics.DefaultRegistry.Each(func(name string, metric interface{}) {
+ // Create or retrieve the counter hierarchy for this metric
+ root, parts := counters, strings.Split(name, "/")
+ for _, part := range parts[:len(parts)-1] {
+ if _, ok := root[part]; !ok {
+ root[part] = make(map[string]interface{})
+ }
+ root = root[part].(map[string]interface{})
+ }
+ name = parts[len(parts)-1]
+
+ // Fill the counter with the metric details
+ switch metric := metric.(type) {
+ case metrics.Meter:
+ root[name] = map[string]interface{}{
+ "Avg01Min": format(metric.Rate1()*60, metric.Rate1()),
+ "Avg05Min": format(metric.Rate5()*300, metric.Rate5()),
+ "Avg15Min": format(metric.Rate15()*900, metric.Rate15()),
+ "Total": format(float64(metric.Count()), metric.RateMean()),
+ }
+
+ case metrics.Timer:
+ root[name] = map[string]interface{}{
+ "Avg01Min": format(metric.Rate1()*60, metric.Rate1()),
+ "Avg05Min": format(metric.Rate5()*300, metric.Rate5()),
+ "Avg15Min": format(metric.Rate15()*900, metric.Rate15()),
+ "Count": format(float64(metric.Count()), metric.RateMean()),
+ "Maximum": time.Duration(metric.Max()).String(),
+ "Minimum": time.Duration(metric.Min()).String(),
+ "Percentile": map[string]interface{}{
+ "20": time.Duration(metric.Percentile(0.2)).String(),
+ "50": time.Duration(metric.Percentile(0.5)).String(),
+ "80": time.Duration(metric.Percentile(0.8)).String(),
+ "95": time.Duration(metric.Percentile(0.95)).String(),
+ "99": time.Duration(metric.Percentile(0.99)).String(),
+ },
+ }
+
+ default:
+ root[name] = "Unknown metric type"
+ }
+ })
+ return counters, nil
+}
diff --git a/rpc/api/debug_js.go b/rpc/api/debug_js.go
index 35fecb75f..e48e4df06 100644
--- a/rpc/api/debug_js.go
+++ b/rpc/api/debug_js.go
@@ -50,6 +50,11 @@ web3._extend({
],
properties:
[
+ new web3._extend.Property({
+ name: 'metrics',
+ getter: 'debug_metrics',
+ outputFormatter: function(obj) { return obj; }
+ })
]
});
`