Golang Testing - PowerPoint PPT Presentation

About This Presentation
Title:

Golang Testing

Description:

Programming is not simple; even the best programmers are not capable of writing programs that work exactly as intended every time. Therefore testing is an important part of the software development process. Golang is an open-source language that has various features that make automated as well as manual testing easier. – PowerPoint PPT presentation

Number of Views:413
Slides: 8
Provided by: Gowitek

less

Transcript and Presenter's Notes

Title: Golang Testing


1
Benefits of testing in Golang
2
Introduction
  • Go is a modern open-source language that has
    several features which make manual as well as
    automated testing easier.
  • Go Test tool conducts writing tests at
    development time.
  • Golang provides code coverage analysis,
    displaying exact lines exercised by tests.
  • Following are some of the advantageous features
    Golang brings to testing environment

3
Logrus
  • Logrus is a feature-rich structured logger for
    Golang. We can write logs asynchronously to avoid
    extra overhead on the system.
  • Benefits
  •  Due to asynchronous logging important resources
    can be saved for other priority tasks.
  •  Service Hooks such as Airbrake help in quick bug
    fixing and superior test code quality while Redis
    features in-memory data set.
  •  Efficiently track and write logs that result in
    neat and well-written code.

4
Golang Benchcmp
  • The benchcmp command displays performance changes
    between benchmarks. Benchcmp parses the output of
    two 'go test' benchmark runs, correlates the
    results per benchmark, and displays the deltas.
  • By setting benchmarks we can easily compare
    system calls by understanding which piece/version
    of code performs better.
  • Benefits
  • Implement superior quality code which is free of
    any performance bottlenecks.

5
Uber Go-Torch
  • Uber Go-Torch is a tool for stochastically
    profiling Go programs. It collects stack traces
    from Golangs built-in pprof library and
    synthesizes this information into a flame graph.
    The flame graph generates data sets about Time
    consumption, Memory Consumption, CPU Usage and
    more.
  • Benefits
  • With so many inputs at their disposal, Uber
    Go-Torch helps developers to understand and
    optimize the code to improve system performance
    to the function level.
  • The resulting code is optimized for speed, CPU
    usage, memory usage, performance and time.

6
Golang Pprof
  • Golang Pprof is Golangs built-in Library. It
    continually generates data. By utilizing the
    Pprof tool we are able to perform CPU profiling
    of the system. It helps us analyze the CPU dump
    and then generate reports on performance in the
    CPU by generating a flame graph.
  • Benefits
  • When used in collaboration with Uber Go-Torch,
    Golang Pprof helps develop code that performs at
    an optimized level.

7
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com