apache / apache/brpc

get_sample 返回的样本数比指定的窗口大小小1?

Open
#1,377 0 comments 0 reactions 0 assignees View on GitHub
discussion
Dominant language
C++
Stars
17.6k
Forks
4.1k
Avg merge
2d 12h
Merged PRs (30d)
69

Description

**Describe the bug (描述bug)**
![image](https://user-images.githubusercontent.com/76277223/114514143-8fa11900-9c6d-11eb-9660-41f202875e7e.png)

照这样写法,假设 window_size 为7,get_sample 返回的样本数为 6,是否合理呢?

**To Reproduce (复现方法)**

**Expected behavior (期望行为)**
get_sample 返回的样本数与指定的窗口大小相等

**Versions (各种版本)**
OS:
Compiler:
brpc:
protobuf:

**Additional context/screenshots (更多上下文/截图)**

Contributor guide

Open the contributing guide

Research direction

Start by locating the get_sample entry point in the C++ source and tracing how window_size determines the returned sample count. Reproduce the reported window_size of 7, then clarify whether the result should contain exactly seven samples and verify the behavior with a focused test.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.