Skip to content

Commit ab44ef1

Browse files
Update API Reference
1 parent c545c1c commit ab44ef1

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

docs/pages/api-reference.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,15 @@ merge_dicts(
339339
```
340340

341341

342+
##### `concat_lists`
343+
344+
```python
345+
def concat_lists(*lists: list[T]) -> list[T]
346+
```
347+
348+
Concatenates multiple lists into one list.
349+
350+
342351
## `tum_esm_utils.decorators`
343352

344353
Decorators that can be used wrap functions.
@@ -1455,6 +1464,15 @@ Checks the memory usage of the system.
14551464
The memory usage in percent.
14561465

14571466

1467+
##### `get_physical_memory_usage`
1468+
1469+
```python
1470+
def get_physical_memory_usage() -> float
1471+
```
1472+
1473+
Returns the memory usage (physical memory) of the current process in MB.
1474+
1475+
14581476
##### `get_disk_space`
14591477

14601478
```python
@@ -1956,6 +1974,22 @@ def reset() -> None
19561974
Reset the waiting period to the first bucket
19571975

19581976

1977+
##### `timed_section`
1978+
1979+
```python
1980+
@contextlib.contextmanager
1981+
def timed_section(label: str) -> Generator[None, None, None]
1982+
```
1983+
1984+
Time a section of code and print the duration.
1985+
Usage example:
1986+
1987+
```python
1988+
with timed_section("my_section"):
1989+
do_something()
1990+
```
1991+
1992+
19591993
## `tum_esm_utils.validators`
19601994

19611995
Implements validator utils for use with pydantic models.

0 commit comments

Comments
 (0)