llnl / llnl/Caliper

how caliper measures code region runtime?

Open
#123 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
420
Forks
80
Avg merge
1d 12h
Merged PRs (30d)
9

Description

Using caliper instrumentation to measure end-to-end runtime, I am confused by the following 2 cases.

Suppose the program is instrumented as following:

main()
{
cali_begin_string_byname('loop', 'main')
..

cali_begin_string_byname('loop', 'loop1')
loop1 code
cali_end_byname('loop')

...
cali_begin_string_byname('loop', 'loop2')
loop1 code
cali_end_byname('loop')
..
cali_end_byname('loop')
}

After data collection, I process the data with
cali-query -s time.inclusive.duration --table a.cali

My expectation is that aggregation of caliper entry "main" should be the end-to-end runtime.
But, I observe two cases:

  1. for some apps, the result is as expected. The entries are like:
    main
    main/loop1
    main/loop2

  2. for others, there is no "main" entry, but only entries like
    main/loop1
    main/loop2

I am not sure why I see the differences between case 1 and case 2.
Could anyone explain this?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shown cali_begin_string_byname and cali_end_byname calls, then reproduce both result shapes using cali-query -s time.inclusive.duration. Check Caliper's documentation for inclusive-duration and nested-region aggregation semantics; done means documenting why the main entry appears in some applications but not others.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
observability-sre, performance
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.