Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1102457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:11:22+00:00 2026-05-17T01:11:22+00:00

Summary When I execute a very simple program using Perl’s Benchmark utility. I get

  • 0

Summary

When I execute a very simple program using Perl’s Benchmark utility. I get values that are not (appearing as) milliseconds or nanoseconds. The benchmark data returned is not useful to me because I do not know how to interpret it.

Example:

use Benchmark;

my $start = Benchmark->new;
print "foo!";
my $end = Benchmark->new;

my $diff = timediff($end, $start);

print timestr($diff);

Returns: foo! 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)

What does the different fields mean: Wallclock seconds, Usr, Sys, CPU? Can they be extrapolated to get a millisecond value? Right now for my benchmarking, all I need is a real-world time for a single execution, without needing to account for some of the more esoteric aspects of benchmarks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:11:22+00:00Added an answer on May 17, 2026 at 1:11 am

    Wallclock seconds is the actual elapsed time, as if you looked at your watch to time it.

    The usr seconds in the time actually spent on the CPU, in user space.

    The sys seconds is the time actually spent on the CPU, in kernel space.

    The CPU time is the total time spent on the CPU.

    However, once you have all of that, you have to figure out what you are actually trying to measure. The Benchmark module only times what you do on the local machine. If you have to fire off processes on a remote machine (e.g. a database server or web server), the CPU times of those machines aren’t part of the result. However, the time you spend waiting for their responses are part of the wallclock time.

    Your results show that everything happened almost instantaneously. You need something more meaty in there so it takes up some time. If you just need the wallclock time for a single run, you don’t need to use Perl at all. Use the times utility from the command line.

    I get into this fairly extensively in Mastering Perl and some of my benchmarking talks. However, just this week I think the Benchmark module became obsolete. Steffen Müller’s Dumbbench does a much better job. See his dumbbench blog entries at blogs.perl.org.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Java Logging API in a simple Servlet application that uses Maven and
I've got a factor with many different values. If you execute summary(factor) the output
Summary : is there a way to get the unique lines from a file
Summary I am after some advice on the easiest way to analyze simple data
Summary jquery is used to retrieve search results via the get() call. When rendering
Summary: I've run into an interesting problem, and I'm not quite sure how to
I am working on implementing a function that would execute another function a few
I have a bunch of very simple functions. Each function has one input and
Summary: Running mvn war:war fails with errors including: The following artifacts could not be
Quick summary: I'm making an application that parses a binary file, stores vertices and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.