Sonde
v1.1.0
Embeddable Model Context Protocol server for Qt applications
Toggle main menu visibility
Loading...
Searching...
No Matches
stalleventsource_p.h
Go to the documentation of this file.
1
#pragma once
2
6
7
#include <
sonde/stalleventsource.h
>
8
9
#include "
stacksampler_p.h
"
10
11
#include <QtCore/QElapsedTimer>
12
#include <QtCore/QTimer>
13
14
#include <memory>
15
16
namespace
Sonde
{
17
19
class
StallEventSourcePrivate
20
{
21
public
:
23
static
StallEventSourcePrivate
*
get
(
StallEventSource
*source) {
return
source->
d
.get(); }
24
27
QString
startSampling
();
29
void
stopSampling
();
30
31
std::chrono::milliseconds
threshold
{ 1 };
32
QTimer
timer
;
33
QElapsedTimer
since
;
34
std::function<bool()>
inBackground
;
37
std::shared_ptr<Detail::StackSampler>
sampler
;
38
};
39
40
}
// namespace Sonde
Sonde::StallEventSourcePrivate
StallEventSource's private part.
Definition
stalleventsource_p.h:20
Sonde::StallEventSourcePrivate::since
QElapsedTimer since
Time since the previous tick.
Definition
stalleventsource_p.h:33
Sonde::StallEventSourcePrivate::inBackground
std::function< bool()> inBackground
Optional: whether the application is in the background.
Definition
stalleventsource_p.h:34
Sonde::StallEventSourcePrivate::get
static StallEventSourcePrivate * get(StallEventSource *source)
The private part of source.
Definition
stalleventsource_p.h:23
Sonde::StallEventSourcePrivate::timer
QTimer timer
The 100 ms tick.
Definition
stalleventsource_p.h:32
Sonde::StallEventSourcePrivate::stopSampling
void stopSampling()
Stops sampling.
Definition
stalleventsource.cpp:31
Sonde::StallEventSourcePrivate::startSampling
QString startSampling()
Starts sampling this source's thread during stalls; call it on that thread.
Definition
stalleventsource.cpp:18
Sonde::StallEventSourcePrivate::threshold
std::chrono::milliseconds threshold
Smallest stall reported.
Definition
stalleventsource_p.h:31
Sonde::StallEventSourcePrivate::sampler
std::shared_ptr< Detail::StackSampler > sampler
Samples the stack during stalls while the server says so; shared with the server's app_status and app...
Definition
stalleventsource_p.h:37
Sonde::StallEventSource
Reports when the event loop of its thread was blocked, as events from source "stalls".
Definition
stalleventsource.h:34
Sonde::StallEventSource::d
PrivatePtr< StallEventSourcePrivate > d
Implementation.
Definition
stalleventsource.h:55
Sonde
Embeddable Model Context Protocol server for Qt applications.
Definition
dispatch.cpp:10
stacksampler_p.h
Private: Sonde::Detail::StackSampler, which samples a thread's stack while it is stalled (design 0016...
stalleventsource.h
Sonde::StallEventSource: events when the main thread was blocked.
src
core
stalleventsource_p.h
Generated by
1.18.0