Skip to content

Commit

Permalink
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions vm/metrics.cpp
Original file line number Diff line number Diff line change
@@ -39,12 +39,16 @@ namespace rubinius {
using namespace utilities;

namespace metrics {
FileEmitter::FileEmitter(MetricsMap& map, std::string path)
FileEmitter::FileEmitter(STATE, MetricsMap& map, std::string path)
: MetricsEmitter()
, metrics_map_(map)
, path_(path)
, fd_(-1)
{
// TODO: Make this a proper feature of the config facility.
state->shared().env()->expand_config_value(
path_, "$PID", state->shared().pid.c_str());

initialize();
}

@@ -254,7 +258,7 @@ namespace rubinius {
state->shared().config.system_metrics_statsd_server.value,
state->shared().config.system_metrics_statsd_prefix.value);
} else if(state->shared().config.system_metrics_target.value.compare("none")) {
emitter_ = new FileEmitter(metrics_map_,
emitter_ = new FileEmitter(state, metrics_map_,
state->shared().config.system_metrics_target.value);
}
}
2 changes: 1 addition & 1 deletion vm/metrics.hpp
Original file line number Diff line number Diff line change
@@ -299,7 +299,7 @@ namespace rubinius {
int fd_;

public:
FileEmitter(MetricsMap& map, std::string path);
FileEmitter(STATE, MetricsMap& map, std::string path);
virtual ~FileEmitter();

void send_metrics();

0 comments on commit 70ba66f

Please sign in to comment.