Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perf docs update #2468

Merged
merged 2 commits into from
Jan 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion docs/manual/consuming_performance_counters.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,24 @@ called:
// print the current number of threads created on locality 0
hpx::performance_counters::performance_counter count(
"/threads{locality#0/total}/count/cumulative");
hpx::cout << count.get_value<int>() << hpx::endl;
hpx::cout << count.get_value<int>().get() << hpx::endl;

For more information about the client component type see
[classref hpx::performance_counters::performance_counter].

[note In the above example count.get_value() returns a future. In order
to print the result we must append .get() to retrieve the value. You
could write the above example like this for more clarity:

```
// print the current number of threads created on locality 0
hpx::performance_counters::performance_counter count(
"/threads{locality#0/total}/count/cumulative");
hpx::future<int> result = count.get_value<int>();
hpx::cout << result.get() << hpx::endl;
```
]

[endsect]

[endsect] [/ Consuming Performance Counter Data]
Expand Down