Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profiling / Optimising #29

Open
zanuka opened this issue May 21, 2018 · 0 comments
Open

Profiling / Optimising #29

zanuka opened this issue May 21, 2018 · 0 comments
Labels

Comments

@zanuka
Copy link
Contributor

zanuka commented May 21, 2018

The Go app should leverage the built-in profiler that supports CPU, memory, goroutine and block (contention) profiling.

easily enabled:

import (
    "net/http"
    _ "net/http/pprof"
)

advantages:

  • low overhead
  • can be used in a production environment
  • can be used with live traffic without any noticeable performance penalties

dev tasks (issues):

  • report the number of incoming requests
  • report how long every request takes.
  • report request details - (URL, IP address and user-agent)
  • send all stats to metric aggregator (e.g. StatsD) In addition, the service needs to
  • measure how many requests per second the API can handle (Apache Benchmark tool)
  • profile the CPU to determine which functions spend most time
  • run heap profiler for in-use memory and number of allocated objects
  • block profiling to show function calls that lead to blocking on sync primitives like mutexes and channels
@zanuka zanuka added the Epic label May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant