You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/07/06 11:53:52 UTC

[GitHub] [dubbo-go] CoolIceV opened a new pull request, #1955: Imp: remove useless time format

CoolIceV opened a new pull request, #1955:
URL: https://github.com/apache/dubbo-go/pull/1955

   <!--  Thanks for sending a pull request!
   Read https://github.com/apache/dubbo-go/blob/master/CONTRIBUTING.md before commit pull request.
   -->
   
   **What this PR does**: 
   Whether this log is output or not, the date will be formatted and cost a lot time, now it will be output without formatting as `2022-07-06 19:37:39.4692053 +0800 CST m=+0.775520901`
   
   **Which issue(s) this PR fixes**: 
   Fixes #1954 
   
   **You should pay attention to items below to ensure your pr passes our ci test**
   We do not merge pr with ci tests failed
   
   - [x] All ut passed (run 'go test ./...' in project root)
   - [x] After go-fmt ed , run 'go fmt project' using goland.
   - [x] Golangci-lint passed, run 'sudo golangci-lint run' in project root.
   - [x] After import formatted, (using [imports-formatter](https://github.com/dubbogo/tools#5-how-to-get-imports-formatter) to run 'imports-formatter .' in project root, to format your import blocks, mentioned in [CONTRIBUTING.md](https://github.com/apache/dubbo-go/blob/master/CONTRIBUTING.md) above) 
   - [x] Your new-created file needs to have [apache license](https://raw.githubusercontent.com/dubbogo/resources/master/tools/license/license.txt) at the top, like other existed file does.
   - [x] All integration test passed. You can run integration test locally (with docker env). Clone our [dubbo-go-samples](https://github.com/apache/dubbo-go-samples) project and replace the go.mod to your dubbo-go, and run 'sudo sh start_integration_test.sh' at root of samples project root. (M1 Slice is not Support)


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks merged pull request #1955: Imp: remove useless time format

Posted by GitBox <gi...@apache.org>.
AlexStocks merged PR #1955:
URL: https://github.com/apache/dubbo-go/pull/1955


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] CoolIceV commented on pull request #1955: Imp: remove useless time format

Posted by GitBox <gi...@apache.org>.
CoolIceV commented on PR #1955:
URL: https://github.com/apache/dubbo-go/pull/1955#issuecomment-1176210929

   I  tested it roughly. When the QPS was high, there was about a ten or so milliseconds' improvement, but when the QPS was low, there didn't seem to be much optimization.


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] CoolIceV commented on pull request #1955: Imp: remove useless time format

Posted by GitBox <gi...@apache.org>.
CoolIceV commented on PR #1955:
URL: https://github.com/apache/dubbo-go/pull/1955#issuecomment-1178502559

   > 如果只是打印当前时间的话是不是用log的时间就可以了
   
   这个需要看log中的时间与所想要打印的时间会有多大的差距,这个本来就是debug用的,我觉得现在这样处理就可以,不用太纠结这个


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] CoolIceV commented on pull request #1955: Imp: remove useless time format

Posted by GitBox <gi...@apache.org>.
CoolIceV commented on PR #1955:
URL: https://github.com/apache/dubbo-go/pull/1955#issuecomment-1176850436

   > %s print time, eventually the String() function is called as well。 If must print the time, you can make a special note。 this should not matter in debug print log mode
   
   I've now just delayed the String() call, meaning that if I don't want to print the log, I won't call the String() method, the original code would have called it whether or not the log was printed.
   Original:
   ![image](https://user-images.githubusercontent.com/42159666/177658797-e647086f-9386-4afd-8ebb-84ed56eba4bb.png)
   Modified:
   ![image](https://user-images.githubusercontent.com/42159666/177658819-02ce4b22-70a1-4b84-88b5-fa16dfe51aa6.png)
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] justxuewei commented on pull request #1955: Imp: remove useless time format

Posted by GitBox <gi...@apache.org>.
justxuewei commented on PR #1955:
URL: https://github.com/apache/dubbo-go/pull/1955#issuecomment-1176134076

   Hi Coollce, thanks for your contribution, if `String()` is removed, how much the performance can be improved?


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org