Skip to content

Commit

Permalink
Merge pull request #92 from george0st/changes
Browse files Browse the repository at this point in the history
Extend README and typo
  • Loading branch information
george0st authored Nov 3, 2024
2 parents 40a7c73 + 7b16a99 commit 7072dd5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@

# QGate-Perf

The QGate Performance is enabler for performance test execution. Key benefits:
The QGate Performance is enabler for python performance test execution. Key benefits:
- **easy performance testing** your python code (key parts - init, start, stop, return)
- **measure only specific part** of your code
- scalability **without limits** (e.g. from 1 to 1k executors)
- scalability **in level of processes and threads** (easy way, how to avoid GIL in python)
- **sequences for execution and data bulk**
- relation to graph generator

NOTE: The recommendations are:
- use Python >= 3.11
- use the 'QGate-Perf-cs' (C# implementation of QGate-Perf), in case of bigger parallelism and lower lateness

## Usage

```python
Expand All @@ -26,7 +30,7 @@ def prf_GIL_impact(run_setup: RunSetup):
""" Your own function for performance testing, you have to add
only part INIT, START, STOP and RETURN"""

# INIT - contain executor synchonization, if needed
# INIT - contain executor synchronization, if needed
probe=ParallelProbe(run_setup)

while (True):
Expand Down
2 changes: 1 addition & 1 deletion qgate_perf/output_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def print_detail(self, run_setup: RunSetup, return_dict, processes, threads, gro
out[FileMarker.PRF_CORE_MAX + suffix] = result.max # ok
out[FileMarker.PRF_CORE_TIME_END] = datetime.utcnow().isoformat(' ')

# human readable form
# human-readable form
readable_out = {}
readable_out[FileMarker.HM_PRF_CORE_PLAN_EXECUTOR_ALL] = f"{processes * threads} [{processes},{threads}]"
readable_out[FileMarker.HM_PRF_CORE_REAL_EXECUTOR] = percentile_summaries[1].executors # executors
Expand Down
2 changes: 1 addition & 1 deletion qgate_perf/percentile_heap.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, call_fn, close_fn, percentile = 0.99, heap_init_size = 127):
:param close_fn: function for close processing
:param percentile: requested percentile (smaller value will affect bigger memory allocation),
recommendation is to use 0.99 or 0.95 (0.99 is default). Accepted values are
higher then 0 and lower than 1.
higher than 0 and lower than 1.
:param heap_init_size: init size for heap (default is 127)
"""
self._init_size = heap_init_size
Expand Down

0 comments on commit 7072dd5

Please sign in to comment.