Skip to content

Commit

Permalink
Change requests done.
Browse files Browse the repository at this point in the history
  • Loading branch information
intjftw committed Jul 1, 2024
1 parent e835a22 commit bd74b5a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
11 changes: 2 additions & 9 deletions plugins/cpp_metrics/service/cxxmetrics.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct CppMetricsAstNodeSingle
3:double value
}

struct CppMetricsAstNodeAllData
struct CppMetricsAstNodeDetailed
{
1:string path,
2:string file,
Expand Down Expand Up @@ -80,13 +80,6 @@ service CppMetricsService
list<CppMetricsAstNodeSingle> getCppMetricsForAstNode(
1:common.AstNodeId astNodeId)

/**
* This function returns all available C++ metrics
* for a particular AST node.
*/
//list<CppMetricsAstNodeSingle> getCppMetricsAndDataForAstNode(
//1:common.AstNodeId astNodeId)

/**
* This function returns all available C++ metrics
* for a particular module (file or directory).
Expand All @@ -109,7 +102,7 @@ service CppMetricsService
*
* The given path is a handled as a prefix.
*/
map<common.AstNodeId, CppMetricsAstNodeAllData> getCppAstNodeMetricsAndDataForPath(
map<common.AstNodeId, CppMetricsAstNodeDetailed> getCppAstNodeMetricsDetailedForPath(
1:string path)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class CppMetricsServiceHandler : virtual public CppMetricsServiceIf
std::map<core::AstNodeId, std::vector<CppMetricsAstNodeSingle>>& _return,
const std::string& path_) override;

void getCppAstNodeMetricsAndDataForPath(
std::map<core::AstNodeId, CppMetricsAstNodeAllData>& _return,
void getCppAstNodeMetricsDetailedForPath(
std::map<core::AstNodeId, CppMetricsAstNodeDetailed>& _return,
const std::string& path_) override;

void getCppFileMetricsForPath(
Expand Down
6 changes: 3 additions & 3 deletions plugins/cpp_metrics/service/src/cppmetricsservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ void CppMetricsServiceHandler::getCppAstNodeMetricsForPath(
});
}

void CppMetricsServiceHandler::getCppAstNodeMetricsAndDataForPath(
std::map<core::AstNodeId, CppMetricsAstNodeAllData>& _return,
void CppMetricsServiceHandler::getCppAstNodeMetricsDetailedForPath(
std::map<core::AstNodeId, CppMetricsAstNodeDetailed>& _return,
const std::string& path_)
{
_transaction([&, this](){
Expand All @@ -185,7 +185,7 @@ void CppMetricsServiceHandler::getCppAstNodeMetricsAndDataForPath(
}
else
{
CppMetricsAstNodeAllData metric;
CppMetricsAstNodeDetailed metric;
std::size_t pos = node.path.find_last_of('/');
metric.path = node.path.substr(0, pos + 1);
metric.file = node.path.substr(pos + 1);
Expand Down

0 comments on commit bd74b5a

Please sign in to comment.