Skip to content

Commit dc712d2

Browse files
committed
Pull fix for example custom tracker field from pyrocore
pyroscope/pyrocore#105
1 parent 9714371 commit dc712d2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### Fixed
6+
- Use all trackers when aggregating in example custom field code
7+
(credit goes to @kchiem: https://github.com/pyroscope/pyrocore/pull/105)
8+
59
## [2.2.1] - 2022-10-24
610

711
### Fixed

docs/examples/custom-fields-trackers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def _custom_fields():
88
# Add rTorrent attributes not available by default
99
def get_tracker_field(obj, name, aggregator=sum):
1010
"Get an aggregated tracker field."
11-
return aggregator(obj.rpc_call("t.multicall", ["", f"t.{name}="])[0])
11+
return aggregator([t[0] for t in obj.rpc_call("t.multicall", ["", f"t.{name}="])])
1212

1313
yield engine.DynamicField(
1414
int,

0 commit comments

Comments
 (0)