Make Timespan namespace shorter.

PiperOrigin-RevId: 279851991
Change-Id: I5a6de3609a0e24425426ddb6837cf942c9410392
This commit is contained in:
A. Unique TensorFlower 2019-11-11 17:19:24 -08:00 committed by TensorFlower Gardener
parent e4ac43671c
commit 9b00382f63
3 changed files with 9 additions and 5 deletions
tensorflow/core/profiler/utils

View File

@ -1,10 +1,17 @@
load("//tensorflow:tensorflow.bzl", "tf_cc_test")
package(
default_visibility = ["//visibility:public"],
default_visibility = ["//tensorflow/core/profiler:internal"],
licenses = ["notice"], # Apache 2.0
)
package_group(
name = "friends",
includes = [
"//tensorflow/core/profiler:friends",
],
)
cc_library(
name = "timespan",
hdrs = ["timespan.h"],
@ -28,6 +35,7 @@ cc_library(
name = "xplane_builder",
srcs = ["xplane_builder.cc"],
hdrs = ["xplane_builder.h"],
visibility = [":friends"],
deps = [
"//tensorflow/core/platform:logging",
"//tensorflow/core/platform:types",

View File

@ -21,7 +21,6 @@ limitations under the License.
namespace tensorflow {
namespace profiler {
namespace utils {
// A Timespan is the time extent of an event: a pair of (begin, duration).
// Events may have duration 0 ("instant events") but duration can't be negative.
@ -93,7 +92,6 @@ class Timespan {
uint64 duration_ps_; // 0 for an instant event.
};
} // namespace utils
} // namespace profiler
} // namespace tensorflow

View File

@ -19,7 +19,6 @@ limitations under the License.
namespace tensorflow {
namespace profiler {
namespace utils {
TEST(TimespanTests, NonInstantSpanIncludesSingleTimeTests) {
EXPECT_TRUE(Timespan(10, 2).Includes(12));
@ -81,6 +80,5 @@ TEST(TimespanTests, InstantSpanNonInstantSpanOverlappedDuration) {
EXPECT_EQ(0, Timespan(12, 0).OverlappedDurationPs(Timespan(8, 16)));
}
} // namespace utils
} // namespace profiler
} // namespace tensorflow