Skip to content

Commit

Permalink
Add new Serializer interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Karteekmurthys committed Jan 31, 2024
1 parent 4d489a4 commit c739d83
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
11 changes: 0 additions & 11 deletions presto-native-execution/presto_cpp/main/PeriodicTaskManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,6 @@ void PeriodicTaskManager::updateCacheStats() {
RECORD_METRIC_VALUE(
kCounterMemoryCacheSumEvictScore, memoryCacheStats.sumEvictScore);

if (memoryCacheStats.ssdStats) {
RECORD_METRIC_VALUE(
kCounterSsdCacheCachedEntries,
memoryCacheStats.ssdStats->entriesCached);
RECORD_METRIC_VALUE(
kCounterSsdCacheCachedRegions,
memoryCacheStats.ssdStats->regionsCached);
RECORD_METRIC_VALUE(
kCounterSsdCacheCachedBytes, memoryCacheStats.ssdStats->bytesCached);
}

// Interval cumulatives.
RECORD_METRIC_VALUE(
kCounterMemoryCacheNumHit,
Expand Down
1 change: 0 additions & 1 deletion presto-native-execution/presto_cpp/main/PrestoMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ int main(int argc, char* argv[]) {
google::InstallFailureSignalHandler();
PRESTO_STARTUP_LOG(INFO) << "Entering main()";
facebook::presto::PrestoServer presto(FLAGS_etc_dir);
facebook::velox::BaseStatsReporter::registered = true;
presto.run();
PRESTO_SHUTDOWN_LOG(INFO) << "Exiting main()";
}
4 changes: 4 additions & 0 deletions presto-native-execution/presto_cpp/main/PrestoServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ void PrestoServer::run() {
exit(EXIT_FAILURE);
}

if(systemConfig->enableRuntimeStatsCollection()) {
// This flag must be set to register the counters.
facebook::velox::BaseStatsReporter::registered = true;
}
registerStatsCounters();
registerFileSinks();
registerFileSystems();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@

namespace facebook::presto {

class MetricsSerializer {
facebook::velox::StringView getMetrics();
};
class StatsReporterImpl : public facebook::velox::BaseStatsReporter {
public:
StatsReporterImpl(
Expand Down

0 comments on commit c739d83

Please sign in to comment.