Bird
0
0

Which Ruby standard library can you use to perform basic performance profiling?

easy📝 Conceptual Q2 of 15
Ruby - Ecosystem and Best Practices
Which Ruby standard library can you use to perform basic performance profiling?
ABenchmark
BNet::HTTP
CCSV
DOpenSSL
Step-by-Step Solution
Solution:
  1. Step 1: Recall Ruby standard libraries for timing

    The Benchmark library measures time taken by code blocks.
  2. Step 2: Exclude unrelated libraries

    Net::HTTP is for web requests, CSV for data files, OpenSSL for encryption.
  3. Final Answer:

    Benchmark -> Option A
  4. Quick Check:

    Ruby profiling library = Benchmark [OK]
Quick Trick: Use Benchmark to measure code execution time easily [OK]
Common Mistakes:
  • Choosing unrelated libraries
  • Confusing profiling with networking
  • Using encryption libraries for profiling

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes