Skip to content

Commit

Permalink
Merge pull request #2468 from STEllAR-GROUP/perf_docs_update
Browse files Browse the repository at this point in the history
Perf docs update
  • Loading branch information
hkaiser committed Jan 27, 2017
2 parents 79a4382 + b1139b1 commit 8cd5e59
Showing 1 changed file with 14 additions and 1 deletion.
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

0 comments on commit 8cd5e59

Please sign in to comment.