Skip to content

Profiling / Optimising #29

Description

@zanuka

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions