Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Symbols]apply use ray internal namespace for stats reporting #28

Merged
merged 2 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions streaming/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ cc_library(
strip_include_prefix = "src",
visibility = ["//visibility:public"],
deps = [
"exported_internal.so",
"stats_lib.so",
":streaming_config",
":streaming_util",
Expand Down
6 changes: 3 additions & 3 deletions streaming/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ workspace(name = "com_github_ray_streaming")

# LOAD RAY WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
ray_version = "2cee219250ccd8900ec8a7c1858310a42a7ca3ed"
ray_version = "remove-exporting-symbols"
ashione marked this conversation as resolved.
Show resolved Hide resolved
http_archive(
name="com_github_ray_project_ray",
strip_prefix = "ray-{}".format(ray_version),
urls = ["https://github.com/ray-project/ray/archive/{}.zip".format(ray_version)],
sha256 = "f0d154b5bee2d17296560440983b89e7f110462ac26bdf00c4269111d4ed08d0",
urls = ["https://github.com/ray-project/ray/archive/refs/heads/{}.zip".format(ray_version)],
#sha256 = "ec96eb8a7c781d1b1e68ac4c8c2c39af18f1c6fa1057ff7e6e00f2ce4b880acf",
)


Expand Down
5 changes: 3 additions & 2 deletions streaming/src/metrics/stats_reporter.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "metrics/stats_reporter.h"
#include "util/streaming_logging.h"
#include "ray/internal/internal.h"

namespace ray {
namespace streaming {
Expand Down Expand Up @@ -33,7 +34,7 @@ bool StatsReporter::Start(const StreamingMetricsConfig &conf) {
<< ", stats disabled : "
<< stats::StatsConfig::instance().IsStatsDisabled();
for (auto &tag : global_tags_) {
global_tag_key_list_.push_back(stats::TagKeyType::Register(tag.first));
global_tag_key_list_.push_back(internal::TagRegister(tag.first));
}
return true;
}
Expand Down Expand Up @@ -90,7 +91,7 @@ void StatsReporter::UpdateGauge(const std::string &metric_name,
std::vector<stats::TagKeyType> tag_key_list(global_tag_key_list_.begin(),
global_tag_key_list_.end());
for (auto &tag : tags) {
tag_key_list.push_back(stats::TagKeyType::Register(tag.first));
tag_key_list.push_back(internal::TagRegister(tag.first));
}
metric = std::shared_ptr<ray::stats::Metric>(
new ray::stats::Gauge(merged_metric_name, "", "", tag_key_list));
Expand Down
2 changes: 1 addition & 1 deletion streaming/src/test/streaming_perf_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class StreamingReporterCounterTest : public ::testing::Test {
absl::Duration harvest_interval = absl::Milliseconds(kReportFlushInterval / 2);
ray::stats::StatsConfig::instance().SetReportInterval(report_interval);
ray::stats::StatsConfig::instance().SetHarvestInterval(harvest_interval);
const stats::TagsType global_tags = {{stats::ResourceNameKey, "CPU"}};
const stats::TagsType global_tags = {};
std::shared_ptr<stats::MetricExporterClient> exporter(
new stats::StdoutExporterClient());
ray::stats::Init(global_tags, 10054, exporter);
Expand Down