Calling API or logging into the console?

痞子三分冷 提交于 2019-12-24 19:53:13

问题


I have a node.js app and I need to implement statistics for it. I have two ways: writing into the console.log and then capturing it using some tool (AWS CloudWatch Metrics) or calling AWS API and send stats over the Internet. The thing is:

  • Writing anything into the console requires resources and time.
  • But calling an API to publish my stats also requires resources and time.

I am curious which way is more effective? Which way I am using less CPU resources?

来源:https://stackoverflow.com/questions/52257298/calling-api-or-logging-into-the-console

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!