Auto merge of #23139 - gterzian:bounded_profiler_with_buffer_feedback, r=jdm

Bound sampler buffer, add length feedback message, fix intermittence in test

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #23109 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23139)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-03-31 10:27:13 -04:00 committed by GitHub
commit 31c02614be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 36 additions and 18 deletions

View file

@ -40,11 +40,15 @@ fn test_sampler() {
);
const RATE: u64 = 10;
const MAX_DURATION: u64 = 10;
sampler_sender
.send(SamplerControlMsg::Enable(Duration::from_millis(RATE)))
.send(SamplerControlMsg::Enable(
Duration::from_millis(RATE),
Duration::from_secs(MAX_DURATION),
))
.unwrap();
thread::sleep(Duration::from_millis(30));
thread::sleep(Duration::from_millis(100));
sampler_sender.send(SamplerControlMsg::Disable).unwrap();