You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "zwoop (via GitHub)" <gi...@apache.org> on 2023/11/27 04:07:42 UTC

[PR] Adds txn counts for outbound conns & cleanup [trafficserver]

zwoop opened a new pull request, #10848:
URL: https://github.com/apache/trafficserver/pull/10848

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Cripts: Adds txn counts for outbound conns & cleanup [trafficserver]

Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on code in PR #10848:
URL: https://github.com/apache/trafficserver/pull/10848#discussion_r1420991987


##########
src/cripts/Error.cc:
##########
@@ -29,7 +29,7 @@ Error::execute(Cript::Context *context)
 
 // These are static, to be used with the get() wrapper
 void
-Error::Message::_set(Cript::Context *context, Cript::string msg)
+Error::Message::_set(Cript::Context *context, const Cript::string &msg)

Review Comment:
   I don't remember now, there was probably some reason I made it a string ...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Cripts: Adds txn counts for outbound conns & cleanup [trafficserver]

Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop merged PR #10848:
URL: https://github.com/apache/trafficserver/pull/10848


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Cripts: Adds txn counts for outbound conns & cleanup [trafficserver]

Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on code in PR #10848:
URL: https://github.com/apache/trafficserver/pull/10848#discussion_r1420991987


##########
src/cripts/Error.cc:
##########
@@ -29,7 +29,7 @@ Error::execute(Cript::Context *context)
 
 // These are static, to be used with the get() wrapper
 void
-Error::Message::_set(Cript::Context *context, Cript::string msg)
+Error::Message::_set(Cript::Context *context, const Cript::string &msg)

Review Comment:
   I don't remember now, there was probably some reason I made it a string ... I changed it for you.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adds txn counts for outbound conns & cleanup [trafficserver]

Posted by "SolidWallOfCode (via GitHub)" <gi...@apache.org>.
SolidWallOfCode commented on code in PR #10848:
URL: https://github.com/apache/trafficserver/pull/10848#discussion_r1406699775


##########
src/cripts/Headers.cc:
##########
@@ -22,24 +22,21 @@
 // Constants
 const Header::Iterator Header::Iterator::_end = Header::Iterator("__END__", Header::Iterator::END_TAG);
 
-namespace Cript
-{
-namespace Method
+namespace Cript::Method
 {
 #undef DELETE // ToDo: macOS shenanigans here, defining DELETE as a macro
-  const Header::Method GET({TS_HTTP_METHOD_GET, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_GET)});
-  const Header::Method HEAD({TS_HTTP_METHOD_HEAD, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_HEAD)});
-  const Header::Method POST({TS_HTTP_METHOD_POST, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_POST)});
-  const Header::Method PUT({TS_HTTP_METHOD_PUT, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_PUT)});
-  const Header::Method PUSH({TS_HTTP_METHOD_PUSH, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_PUSH)});
-  const Header::Method DELETE({TS_HTTP_METHOD_DELETE, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_DELETE)});
-  const Header::Method OPTIONS({TS_HTTP_METHOD_OPTIONS, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_OPTIONS)});
-  const Header::Method CONNECT({TS_HTTP_METHOD_CONNECT, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_CONNECT)});
-  const Header::Method TRACE({TS_HTTP_METHOD_TRACE, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_TRACE)});
-  // This is a special feature of ATS
-  const Header::Method PURGE({TS_HTTP_METHOD_PURGE, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_PURGE)});
-} // namespace Method
-} // namespace Cript
+const Header::Method GET({TS_HTTP_METHOD_GET, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_GET)});

Review Comment:
   Why not make an overloaded constructor that does the cast?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adds txn counts for outbound conns & cleanup [trafficserver]

Posted by "SolidWallOfCode (via GitHub)" <gi...@apache.org>.
SolidWallOfCode commented on code in PR #10848:
URL: https://github.com/apache/trafficserver/pull/10848#discussion_r1406862416


##########
src/cripts/Error.cc:
##########
@@ -29,7 +29,7 @@ Error::execute(Cript::Context *context)
 
 // These are static, to be used with the get() wrapper
 void
-Error::Message::_set(Cript::Context *context, Cript::string msg)
+Error::Message::_set(Cript::Context *context, const Cript::string &msg)

Review Comment:
   Shouldn't this be a view?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Cripts: Adds txn counts for outbound conns & cleanup [trafficserver]

Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on code in PR #10848:
URL: https://github.com/apache/trafficserver/pull/10848#discussion_r1427011709


##########
src/cripts/Headers.cc:
##########
@@ -22,24 +22,21 @@
 // Constants
 const Header::Iterator Header::Iterator::_end = Header::Iterator("__END__", Header::Iterator::END_TAG);
 
-namespace Cript
-{
-namespace Method
+namespace Cript::Method
 {
 #undef DELETE // ToDo: macOS shenanigans here, defining DELETE as a macro
-  const Header::Method GET({TS_HTTP_METHOD_GET, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_GET)});
-  const Header::Method HEAD({TS_HTTP_METHOD_HEAD, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_HEAD)});
-  const Header::Method POST({TS_HTTP_METHOD_POST, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_POST)});
-  const Header::Method PUT({TS_HTTP_METHOD_PUT, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_PUT)});
-  const Header::Method PUSH({TS_HTTP_METHOD_PUSH, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_PUSH)});
-  const Header::Method DELETE({TS_HTTP_METHOD_DELETE, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_DELETE)});
-  const Header::Method OPTIONS({TS_HTTP_METHOD_OPTIONS, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_OPTIONS)});
-  const Header::Method CONNECT({TS_HTTP_METHOD_CONNECT, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_CONNECT)});
-  const Header::Method TRACE({TS_HTTP_METHOD_TRACE, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_TRACE)});
-  // This is a special feature of ATS
-  const Header::Method PURGE({TS_HTTP_METHOD_PURGE, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_PURGE)});
-} // namespace Method
-} // namespace Cript
+const Header::Method GET({TS_HTTP_METHOD_GET, static_cast<Cript::string_view::size_type>(TS_HTTP_LEN_GET)});

Review Comment:
   Ok, changed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org