• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7     http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 #ifndef TENSORFLOW_CORE_KERNELS_DATA_STATS_UTILS_H_
16 #define TENSORFLOW_CORE_KERNELS_DATA_STATS_UTILS_H_
17 
18 #include "tensorflow/core/platform/types.h"
19 
20 namespace tensorflow {
21 namespace data {
22 namespace stats_utils {
23 extern const char kDelimiter[];
24 extern const char kExecutionTime[];
25 extern const char kThreadUtilization[];
26 extern const char kBufferSize[];
27 extern const char kBufferCapacity[];
28 extern const char kBufferUtilization[];
29 extern const char kFilteredElements[];
30 extern const char kDroppedElements[];
31 extern const char kFeaturesCount[];
32 extern const char kFeatureValuesCount[];
33 extern const char kExamplesCount[];
34 
35 // Name for tf.data function execution time (in ns) histogram metrics.
36 string ExecutionTimeHistogramName(const string& prefix);
37 
38 // Name for thread utilization (ratio of threads being used and maximum number
39 // of threads allocated) scalar metrics.
40 string ThreadUtilizationScalarName(const string& prefix);
41 
42 // Name for buffer size scalar metrics.
43 string BufferSizeScalarName(const string& prefix);
44 
45 // Name for buffer capacity (maximum allocated buffer size) scalar metrics.
46 string BufferCapacityScalarName(const string& prefix);
47 
48 // Name for buffer utilization (ratio of buffer size and maximum allocated
49 // buffer size.) histogram metrics.
50 string BufferUtilizationHistogramName(const string& prefix);
51 
52 // Name for filtered elements scalar metrics.
53 string FilterdElementsScalarName(const string& prefix);
54 
55 // Name for dropped elements scalar mereics.
56 string DroppedElementsScalarName(const string& prefix);
57 
58 // Name for features count histogram metrics.
59 string FeatureHistogramName(const string& prefix);
60 
61 // Name for feature-values count histogram metrics.
62 string FeatureValueHistogramName(const string& prefix);
63 
64 }  // namespace stats_utils
65 }  // namespace data
66 }  // namespace tensorflow
67 
68 #endif  // TENSORFLOW_CORE_KERNELS_DATA_STATS_UTILS_H_
69