DevTools sample rate is incorrect.
- Lingua principale
- Dart
- Stelle
- 1.7k
- Fork
- 404
- Merge medio
- 6g 17h
- PR unite (30g)
- 18
Descrizione
### Steps to reproduce
1. Open Devtools
2. Connect to an App
3. Select the CPU profiler tab
4. Set the cpu sampling rate to high
5. Record some data
6. Once the data is recorded, note the smallest available sample, which reveals how often the stack is sampled
7. Look at the bottom of the graph, where the supposed sample rate is stored
### Expected results
The minimum possible sample would be 0.05 milliseconds
The number of samples taken would be the sample's length divided by the sample rate.
### Actual results
The minimum possible sample is variable, lowest I saw was 0.9ms
There are sometimes only a few dozen samples when doing multi-second recordings.

### Code sample
Not necessary.
### Screenshots or Video
Screenshots / Video demonstration
[Youtube upload, because github doesn't like MKV](https://youtu.be/H41i-UdTRhE)
### Logs
_No response_
### Flutter Doctor output
Doctor output
```console
PS C:\Users\Hidden> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.8, on Microsoft Windows [Version 10.0.22631.3085], locale en-BE)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.7.6)
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.85.2)
[✓] Connected device (4 available)
[✓] Network resources
• No issues found!
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Riproduci il problema in DevTools connettendoti a un’app, aprendo il CPU profiler, selezionando una frequenza di campionamento elevata e registrando per diversi secondi. Confronta il campione visualizzato più piccolo e il numero totale di campioni con la frequenza configurata; l’attività è completata quando il campione minimo e il numero corrispondono al comportamento di campionamento previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- dart, devtools, flutter
- Ambito
- devtools, performance
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100