diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD index 60630859f8f..429d123dea6 100644 --- a/tensorflow/core/BUILD +++ b/tensorflow/core/BUILD @@ -228,12 +228,7 @@ cc_library( "lib/io/table_builder.h", "lib/io/table_options.h", "lib/math/math_util.h", - "lib/monitoring/collected_metrics.h", - "lib/monitoring/collection_registry.h", "lib/monitoring/counter.h", - "lib/monitoring/metric_def.h", - "lib/monitoring/mobile_counter.h", - "lib/monitoring/mobile_sampler.h", "lib/monitoring/sampler.h", "lib/random/distribution_sampler.h", "lib/random/philox_random.h", @@ -1089,6 +1084,11 @@ cc_library( "lib/io/zlib_compression_options.h", "lib/io/zlib_inputstream.h", "lib/io/zlib_outputbuffer.h", + "lib/monitoring/collected_metrics.h", + "lib/monitoring/collection_registry.h", + "lib/monitoring/metric_def.h", + "lib/monitoring/mobile_counter.h", + "lib/monitoring/mobile_sampler.h", "lib/png/png_io.h", "lib/random/random.h", "lib/random/random_distributions.h", @@ -1101,6 +1101,7 @@ cc_library( "platform/demangle.h", "platform/denormal.h", "platform/host_info.h", + "platform/monitoring.h", "platform/platform.h", "platform/protobuf_internal.h", "platform/tensor_coding.h", diff --git a/tensorflow/core/platform/default/monitoring.cc b/tensorflow/core/platform/default/monitoring.cc new file mode 100644 index 00000000000..267989031d3 --- /dev/null +++ b/tensorflow/core/platform/default/monitoring.cc @@ -0,0 +1,24 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#include "tensorflow/core/platform/monitoring.h" + +namespace tensorflow { +namespace monitoring { + +void StartExporter() {} + +} // namespace monitoring +} // namespace tensorflow diff --git a/tensorflow/core/platform/monitoring.h b/tensorflow/core/platform/monitoring.h new file mode 100644 index 00000000000..743a2b93986 --- /dev/null +++ b/tensorflow/core/platform/monitoring.h @@ -0,0 +1,30 @@ +/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef THIRD_PARTY_TENSORFLOW_CORE_PLATFORM_MONITORING_H_ +#define THIRD_PARTY_TENSORFLOW_CORE_PLATFORM_MONITORING_H_ + +namespace tensorflow { +namespace monitoring { + +// A hook to start periodically exporting metrics collected through our +// monitoring API. The TensorFlow runtime will call this the first time a new +// session is created using the NewSession method. +void StartExporter(); + +} // namespace monitoring +} // namespace tensorflow + +#endif // THIRD_PARTY_TENSORFLOW_CORE_PLATFORM_MONITORING_H_