Skip to content

Commit

Permalink
Exposed GenerateHostResult() and GenerateRecommendation() to header f…
Browse files Browse the repository at this point in the history
…ile.

PiperOrigin-RevId: 288705912
Change-Id: Iae647aa415c7b011a8b9ced3c729d06c94a919c8
  • Loading branch information
tensorflower-gardener committed Jan 8, 2020
1 parent f65d625 commit 2886154
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Expand Up @@ -256,6 +256,12 @@ InputOpDetails ConvertOpMetricsToInputOpDetails(const OpMetrics& op_metrics,
return details;
}

string AnchorElement(absl::string_view url, absl::string_view text) {
return absl::StrCat("<a href=\"", url, "\" target=\"_blank\">", text, "</a>");
}

} // namespace

void GenerateHostResult(const OpMetricsDb& host_tf_metrics_db,
InputPipelineAnalysisResult* result) {
InputOpMetrics input_op_metrics = SelectInputOpMetrics(host_tf_metrics_db);
Expand Down Expand Up @@ -320,10 +326,6 @@ void GenerateHostResult(const OpMetricsDb& host_tf_metrics_db,
unclassified_non_enqueue_time_us);
}

string AnchorElement(absl::string_view url, absl::string_view text) {
return absl::StrCat("<a href=\"", url, "\" target=\"_blank\">", text, "</a>");
}

InputPipelineAnalysisRecommendation GenerateRecommendation() {
const absl::string_view kDatasetIntro =
"https://www.tensorflow.org/programmers_guide/datasets";
Expand Down Expand Up @@ -365,8 +367,6 @@ InputPipelineAnalysisRecommendation GenerateRecommendation() {
return recommendation;
}

} // namespace

StepSummary ComputeStepTimeSummaryInMs(
const protobuf::RepeatedPtrField<PerCoreStepInfo>& grouped_by_step) {
Stat<double> total_step_stats_in_ms;
Expand Down
Expand Up @@ -33,6 +33,11 @@ StepSummary ComputeStepTimeSummaryInMs(
const ::tensorflow::protobuf::RepeatedPtrField<PerCoreStepInfo>&
grouped_by_step);

void GenerateHostResult(const OpMetricsDb& host_tf_metrics_db,
InputPipelineAnalysisResult* result);

InputPipelineAnalysisRecommendation GenerateRecommendation();

} // namespace profiler
} // namespace tensorflow

Expand Down

0 comments on commit 2886154

Please sign in to comment.