---
title: llarp::Profiling

---

# llarp::Profiling





## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[Profiling](Classes/structllarp_1_1Profiling.md#function-profiling)**() |
| bool | **[IsBad](Classes/structllarp_1_1Profiling.md#function-isbad)**(const [RouterID](Classes/structllarp_1_1RouterID.md) & r, uint64_t chances =profiling_chances)<br>generic variant  |
| bool | **[IsBadForPath](Classes/structllarp_1_1Profiling.md#function-isbadforpath)**(const [RouterID](Classes/structllarp_1_1RouterID.md) & r, uint64_t chances =profiling_chances)<br>check if this router should have paths built over it  |
| bool | **[IsBadForConnect](Classes/structllarp_1_1Profiling.md#function-isbadforconnect)**(const [RouterID](Classes/structllarp_1_1RouterID.md) & r, uint64_t chances =profiling_chances)<br>check if this router should be connected directly to  |
| void | **[MarkConnectTimeout](Classes/structllarp_1_1Profiling.md#function-markconnecttimeout)**(const [RouterID](Classes/structllarp_1_1RouterID.md) & r) |
| void | **[MarkConnectSuccess](Classes/structllarp_1_1Profiling.md#function-markconnectsuccess)**(const [RouterID](Classes/structllarp_1_1RouterID.md) & r) |
| void | **[MarkPathTimeout](Classes/structllarp_1_1Profiling.md#function-markpathtimeout)**([path::Path](Classes/structllarp_1_1path_1_1Path.md) * p) |
| void | **[MarkPathFail](Classes/structllarp_1_1Profiling.md#function-markpathfail)**([path::Path](Classes/structllarp_1_1path_1_1Path.md) * p) |
| void | **[MarkPathSuccess](Classes/structllarp_1_1Profiling.md#function-markpathsuccess)**([path::Path](Classes/structllarp_1_1path_1_1Path.md) * p) |
| void | **[MarkHopFail](Classes/structllarp_1_1Profiling.md#function-markhopfail)**(const [RouterID](Classes/structllarp_1_1RouterID.md) & r) |
| void | **[ClearProfile](Classes/structllarp_1_1Profiling.md#function-clearprofile)**(const [RouterID](Classes/structllarp_1_1RouterID.md) & r) |
| void | **[Tick](Classes/structllarp_1_1Profiling.md#function-tick)**() |
| bool | **[Load](Classes/structllarp_1_1Profiling.md#function-load)**(const fs::path fname) |
| bool | **[Save](Classes/structllarp_1_1Profiling.md#function-save)**(const fs::path fname) |
| bool | **[ShouldSave](Classes/structllarp_1_1Profiling.md#function-shouldsave)**(llarp_time_t now) const |
| void | **[Disable](Classes/structllarp_1_1Profiling.md#function-disable)**() |
| void | **[Enable](Classes/structllarp_1_1Profiling.md#function-enable)**() |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| const int | **[profiling_chances](Classes/structllarp_1_1Profiling.md#variable-profiling-chances)**  |

## Public Functions Documentation

### function Profiling

```cpp
Profiling()
```


### function IsBad

```cpp
bool IsBad(
    const RouterID & r,
    uint64_t chances =profiling_chances
)
```

generic variant 

### function IsBadForPath

```cpp
bool IsBadForPath(
    const RouterID & r,
    uint64_t chances =profiling_chances
)
```

check if this router should have paths built over it 

### function IsBadForConnect

```cpp
bool IsBadForConnect(
    const RouterID & r,
    uint64_t chances =profiling_chances
)
```

check if this router should be connected directly to 

### function MarkConnectTimeout

```cpp
void MarkConnectTimeout(
    const RouterID & r
)
```


### function MarkConnectSuccess

```cpp
void MarkConnectSuccess(
    const RouterID & r
)
```


### function MarkPathTimeout

```cpp
void MarkPathTimeout(
    path::Path * p
)
```


### function MarkPathFail

```cpp
void MarkPathFail(
    path::Path * p
)
```


### function MarkPathSuccess

```cpp
void MarkPathSuccess(
    path::Path * p
)
```


### function MarkHopFail

```cpp
void MarkHopFail(
    const RouterID & r
)
```


### function ClearProfile

```cpp
void ClearProfile(
    const RouterID & r
)
```


### function Tick

```cpp
void Tick()
```


### function Load

```cpp
bool Load(
    const fs::path fname
)
```


### function Save

```cpp
bool Save(
    const fs::path fname
)
```


### function ShouldSave

```cpp
bool ShouldSave(
    llarp_time_t now
) const
```


### function Disable

```cpp
void Disable()
```


### function Enable

```cpp
void Enable()
```


## Public Attributes Documentation

### variable profiling_chances

```cpp
static const int profiling_chances = 4;
```


-------------------------------

Updated on 2023-01-20 at 18:12:18 +0000