Git Product home page Git Product logo

cpu-performance-analysis's Introduction

Quickstart example guide to cpu performance analysis for Golang and .NET Core

CPU performance analysis demo for docker containers using FlameGraphs

VIDEO: YouTube sample

Get all the tools

  1. Download my perf containers (My desktop repo). You will need the dockerfile and the docker-compose file here

Note: You need the dotnet core version of the application you are profiling. Check and adjust the dockerfile accordingly Change directory to where you downloaded those files and run docker-compose build to compile perf tools with dotnetcore SDK

  1. Download the flamegraph container
docker pull aimvector/flamegraph

Start the sample stack

In this directory of this repo, run

docker-compose build
docker-compose up

While the stack is running you can profile it with the perf container

Option 1: Perf

Checkout the perf example here

Option 2: eBPF

Checkout the ebpf example here

KUBERNETES

The same process above works for Kubernetes containers as well. Instead of docker-compose, you will have to use the ./k8s.yaml file in this repo that runs the perf container in a pod in your cluster. Be warned! It's armed with priviledges so use with caution and delete it when done :)

Instead of docker cp, you can use kubectl cp to copy out.perf to your machine where you can run the above flamegraph container. So therefore the same concept applies in Kubernetes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.