diff options
author | Erik Johnston <erik@matrix.org> | 2015-09-25 11:38:28 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-09-25 11:38:28 +0100 |
commit | a14665bde7730872627e956860be0d727a53e26d (patch) | |
tree | eeb44967874a737bd2492b6591966a389de1aeda /synapse/config/metrics.py | |
parent | Bundle in some room state in the unsigned bit of the invite when sending to i... (diff) | |
parent | Merge pull request #289 from matrix-org/markjh/fix_sql (diff) | |
download | synapse-a14665bde7730872627e956860be0d727a53e26d.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/invite_state
Diffstat (limited to 'synapse/config/metrics.py')
-rw-r--r-- | synapse/config/metrics.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/config/metrics.py b/synapse/config/metrics.py index ae5a691527..825fec9a38 100644 --- a/synapse/config/metrics.py +++ b/synapse/config/metrics.py @@ -19,13 +19,15 @@ from ._base import Config class MetricsConfig(Config): def read_config(self, config): self.enable_metrics = config["enable_metrics"] + self.report_stats = config.get("report_stats", None) self.metrics_port = config.get("metrics_port") self.metrics_bind_host = config.get("metrics_bind_host", "127.0.0.1") - def default_config(self, config_dir_path, server_name): - return """\ + def default_config(self, report_stats=None, **kwargs): + suffix = "" if report_stats is None else "report_stats: %(report_stats)s\n" + return ("""\ ## Metrics ### # Enable collection and rendering of performance metrics enable_metrics: False - """ + """ + suffix) % locals() |