JavaRush
AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • go test -race — what it catches and what it doesn’t

    Go SELF
    71 level,0 lecture
    Let’s break down why you should run tests with -race, what exactly counts as a data race in Go, how to read race detector reports, and why the absence of warnings is not a correctness guarantee. Using an in-memory store with a map and a nextID counter as an example, we’ll show how to reproduce a race, strengthen the test, then fix the issue using sync.Mutex and re-verify the result.
    Open
  • Parallel tests — t.Parallel(), an anti-flaky approach

    Go SELF
    71 level,1 lecture
    We break down how to speed up and “harden” tests in Go using parallel execution: where and why to call t.Parallel(), how it works with subtests t.Run(), how to isolate the environment via t.TempDir(), and how to build an anti-flaky approach (without “treating” instability with time.Sleep()). We also discuss common pitfalls: shared state, env variables, ports, loop variables in table-driven tests, and time dependence.
    Open
  • Concurrency tests: waiting for a goroutine to finish

    Go SELF
    71 level,2 lecture
    We break down why concurrency tests often “hang”, and how to write them so they wait for completion but don’t wait forever: the select pattern with a timeout via time.After, done channels ( chan struct{}), waiting for sync.WaitGroup with a time limit, and using context.WithTimeout as a “single kill switch” for cancellation. At the end: common mistakes— time.Sleep instead of waiting for an event, wg.Wait() without a timeout, and unbuffered result channels.
    Open
  • Benchmarks in Go: BenchmarkXxx, b.ResetTimer, -bench, -benchtime

    Go SELF
    71 level,3 lecture
    We cover practical microbenchmarks in Go: how BenchmarkXxx functions work with * testing.B, how to run iterations correctly using b.N or b.Loop(), why you need the timer ( b.ResetTimer(), b.StopTimer(), b.StartTimer()), how to run measurements with flags -bench, -run, -benchtime, and why, without a sink variable, you can end up “measuring the compiler’s optimizations” rather than your code.
    Open
  • pprof in Go: CPU and memory profiles, go tool pprof, reading top and hotspots

    Go SELF
    71 level,4 lecture
    We cover the practical minimum of profiling in Go with pprof: how to capture CPU and heap profiles using go test and the -cpuprofile/ -memprofile flags, how to open them with go tool pprof, how to read top and top -cum, how to find hotspots and jump to lines with list. With examples, we show why fmt.Sprintf and string concatenation are dangerous in a “hot” loop, and how to interpret profiles without confusing CPU and memory.
    Open
Learn
  • Registration
  • Java course
  • Help with tasks
  • Pricing
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Activities
Company
  • About us
  • Contacts
  • Reviews
  • FAQ
  • Support
JavaRushJavaRush — is an interactive online course for learning Java programming from scratch. It contains 1200 practical tasks with one-click solution checking, the necessary minimum of theory on Java basics, and motivating features that help you complete the course: games, quizzes, interesting projects and articles on effective learning and the career of a Java developer.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush
MastercardVisa
"Programmers are not born" © 2026 JavaRush