Unverified Commit 3d1f3588 authored by Pete Stevenson's avatar Pete Stevenson Committed by Copybara
Browse files

detect_application.h|detect_application.cc: add support for java.


Summary: detect_application.h|detect_application.cc: add support for java.

Test Plan: Existing tests.

Reviewers: #stirling, oazizi

Reviewed By: #stirling, oazizi

JIRA Issues: PP-2982
Signed-off-by: default avatarPete Stevenson <jps@pixielabs.ai>

Differential Revision: https://phab.corp.pixielabs.ai/D9902

GitOrigin-RevId: babdb2497f6776e75d11ef70b96ab4124ce5aeb6
parent 72190467
Showing with 5 additions and 0 deletions
+5 -0
......@@ -30,12 +30,16 @@ namespace px {
namespace stirling {
Application DetectApplication(const std::filesystem::path& exe) {
constexpr std::string_view kJavaFileName = "java";
constexpr std::string_view kNodeFileName = "node";
constexpr std::string_view kNodejsFileName = "nodejs";
if (exe.filename() == kNodeFileName || exe.filename() == kNodejsFileName) {
return Application::kNode;
}
if (exe.filename() == kJavaFileName) {
return Application::kJava;
}
return Application::kUnknown;
}
......
......@@ -30,6 +30,7 @@ namespace stirling {
enum class Application {
kUnknown,
kNode,
kJava,
};
// Returns the application of the input executable.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment