Add sync support for the AsyncPostgresStore #1164
Annotations
1 warning and 2 notices
benchmark
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Benchmark results:
libs/checkpoint-postgres/langgraph/store/postgres/aio.py#L1
.........................................
fanout_to_subgraph_10x: Mean +- std dev: 59.7 ms +- 2.2 ms
.........................................
fanout_to_subgraph_10x_sync: Mean +- std dev: 50.2 ms +- 0.6 ms
.........................................
fanout_to_subgraph_10x_checkpoint: Mean +- std dev: 90.2 ms +- 7.2 ms
.........................................
fanout_to_subgraph_10x_checkpoint_sync: Mean +- std dev: 92.6 ms +- 1.2 ms
.........................................
fanout_to_subgraph_100x: Mean +- std dev: 598 ms +- 35 ms
.........................................
fanout_to_subgraph_100x_sync: Mean +- std dev: 490 ms +- 5 ms
.........................................
fanout_to_subgraph_100x_checkpoint: Mean +- std dev: 926 ms +- 43 ms
.........................................
fanout_to_subgraph_100x_checkpoint_sync: Mean +- std dev: 906 ms +- 16 ms
.........................................
react_agent_10x: Mean +- std dev: 30.8 ms +- 0.8 ms
.........................................
react_agent_10x_sync: Mean +- std dev: 22.6 ms +- 0.3 ms
.........................................
react_agent_10x_checkpoint: Mean +- std dev: 47.3 ms +- 1.0 ms
.........................................
react_agent_10x_checkpoint_sync: Mean +- std dev: 39.3 ms +- 3.9 ms
.........................................
react_agent_100x: Mean +- std dev: 342 ms +- 7 ms
.........................................
react_agent_100x_sync: Mean +- std dev: 271 ms +- 4 ms
.........................................
react_agent_100x_checkpoint: Mean +- std dev: 948 ms +- 20 ms
.........................................
react_agent_100x_checkpoint_sync: Mean +- std dev: 839 ms +- 7 ms
.........................................
wide_state_25x300: Mean +- std dev: 23.0 ms +- 0.4 ms
.........................................
WARNING: the benchmark result may be unstable
* the standard deviation (1.82 ms) is 12% of the mean (15.6 ms)
Try to rerun the benchmark with more runs, values and/or loops.
Run 'python -m pyperf system tune' command to reduce the system jitter.
Use pyperf stats, pyperf dump and pyperf hist to analyze results.
Use --quiet option to hide these warnings.
wide_state_25x300_sync: Mean +- std dev: 15.6 ms +- 1.8 ms
.........................................
wide_state_25x300_checkpoint: Mean +- std dev: 288 ms +- 16 ms
.........................................
wide_state_25x300_checkpoint_sync: Mean +- std dev: 275 ms +- 14 ms
.........................................
wide_state_15x600: Mean +- std dev: 27.0 ms +- 0.5 ms
.........................................
wide_state_15x600_sync: Mean +- std dev: 16.8 ms +- 0.2 ms
.........................................
wide_state_15x600_checkpoint: Mean +- std dev: 488 ms +- 16 ms
.........................................
wide_state_15x600_checkpoint_sync: Mean +- std dev: 472 ms +- 16 ms
.........................................
wide_state_9x1200: Mean +- std dev: 26.8 ms +- 0.5 ms
.........................................
wide_state_9x1200_sync: Mean +- std dev: 16.7 ms +- 0.2 ms
.........................................
wide_state_9x1200_checkpoint: Mean +- std dev: 325 ms +- 18 ms
.........................................
wide_state_9x1200_checkpoint_sync: Mean +- std dev: 308 ms +- 15 ms
|
Comparison against main:
libs/checkpoint-postgres/langgraph/store/postgres/aio.py#L1
+-----------------------------------------+---------+-----------------------+
| Benchmark | main | changes |
+=========================================+=========+=======================+
| fanout_to_subgraph_100x | 614 ms | 598 ms: 1.03x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x_checkpoint_sync | 923 ms | 906 ms: 1.02x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x_checkpoint | 941 ms | 926 ms: 1.02x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_checkpoint_sync | 93.9 ms | 92.6 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_10x_sync | 50.8 ms | 50.2 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_25x300 | 23.2 ms | 23.0 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| wide_state_9x1200 | 27.0 ms | 26.8 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| fanout_to_subgraph_100x_sync | 494 ms | 490 ms: 1.01x faster |
+-----------------------------------------+---------+-----------------------+
| react_agent_100x_checkpoint_sync | 843 ms | 839 ms: 1.00x faster |
+-----------------------------------------+---------+-----------------------+
| react_agent_10x_sync | 22.4 ms | 22.6 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| wide_state_9x1200_sync | 16.5 ms | 16.7 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| wide_state_15x600_sync | 16.6 ms | 16.8 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| react_agent_10x_checkpoint | 46.7 ms | 47.3 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| react_agent_100x_checkpoint | 936 ms | 948 ms: 1.01x slower |
+-----------------------------------------+---------+-----------------------+
| wide_state_9x1200_checkpoint | 320 ms | 325 ms: 1.02x slower |
+-----------------------------------------+---------+-----------------------+
| Geometric mean | (ref) | 1.00x faster |
+-----------------------------------------+---------+-----------------------+
Benchmark hidden because not significant (13): fanout_to_subgraph_10x_checkpoint, react_agent_10x, wide_state_15x600, fanout_to_subgraph_10x, react_agent_100x, wide_state_15x600_checkpoint, react_agent_100x_sync, wide_state_15x600_checkpoint_sync, wide_state_25x300_checkpoint, wide_state_25x300_checkpoint_sync, wide_state_25x300_sync, react_agent_10x_checkpoint_sync, wide_state_9x1200_checkpoint_sync
|