Skip to content

Add sync support for the AsyncPostgresStore #1165

Add sync support for the AsyncPostgresStore

Add sync support for the AsyncPostgresStore #1165

Triggered via pull request December 6, 2024 23:49
Status Success
Total duration 46m 44s
Artifacts

bench.yml

on: pull_request
Fit to window
Zoom out
Zoom in

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: 60.1 ms +- 1.7 ms ......................................... fanout_to_subgraph_10x_sync: Mean +- std dev: 50.9 ms +- 0.6 ms ......................................... fanout_to_subgraph_10x_checkpoint: Mean +- std dev: 91.1 ms +- 7.7 ms ......................................... fanout_to_subgraph_10x_checkpoint_sync: Mean +- std dev: 92.8 ms +- 1.0 ms ......................................... fanout_to_subgraph_100x: Mean +- std dev: 595 ms +- 27 ms ......................................... fanout_to_subgraph_100x_sync: Mean +- std dev: 495 ms +- 5 ms ......................................... fanout_to_subgraph_100x_checkpoint: Mean +- std dev: 935 ms +- 36 ms ......................................... fanout_to_subgraph_100x_checkpoint_sync: Mean +- std dev: 914 ms +- 18 ms ......................................... react_agent_10x: Mean +- std dev: 30.8 ms +- 0.6 ms ......................................... react_agent_10x_sync: Mean +- std dev: 22.4 ms +- 0.2 ms ......................................... react_agent_10x_checkpoint: Mean +- std dev: 46.3 ms +- 0.9 ms ......................................... react_agent_10x_checkpoint_sync: Mean +- std dev: 38.3 ms +- 3.2 ms ......................................... react_agent_100x: Mean +- std dev: 342 ms +- 7 ms ......................................... react_agent_100x_sync: Mean +- std dev: 272 ms +- 3 ms ......................................... react_agent_100x_checkpoint: Mean +- std dev: 934 ms +- 9 ms ......................................... react_agent_100x_checkpoint_sync: Mean +- std dev: 832 ms +- 6 ms ......................................... wide_state_25x300: Mean +- std dev: 23.1 ms +- 0.4 ms ......................................... WARNING: the benchmark result may be unstable * the standard deviation (1.58 ms) is 10% of the mean (15.4 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.4 ms +- 1.6 ms ......................................... wide_state_25x300_checkpoint: Mean +- std dev: 287 ms +- 14 ms ......................................... wide_state_25x300_checkpoint_sync: Mean +- std dev: 274 ms +- 13 ms ......................................... wide_state_15x600: Mean +- std dev: 26.9 ms +- 0.5 ms ......................................... wide_state_15x600_sync: Mean +- std dev: 16.5 ms +- 0.2 ms ......................................... wide_state_15x600_checkpoint: Mean +- std dev: 490 ms +- 16 ms ......................................... wide_state_15x600_checkpoint_sync: Mean +- std dev: 474 ms +- 15 ms ......................................... wide_state_9x1200: Mean +- std dev: 27.0 ms +- 0.5 ms ......................................... wide_state_9x1200_sync: Mean +- std dev: 16.5 ms +- 0.2 ms ......................................... wide_state_9x1200_checkpoint: Mean +- std dev: 322 ms +- 15 ms ......................................... wide_state_9x1200_checkpoint_sync: Mean +- std dev: 308 ms +- 14 ms
Comparison against main: libs/checkpoint-postgres/langgraph/store/postgres/aio.py#L1
+-----------------------------------------+---------+-----------------------+ | Benchmark | main | changes | +=========================================+=========+=======================+ | fanout_to_subgraph_100x | 614 ms | 595 ms: 1.03x faster | +-----------------------------------------+---------+-----------------------+ | react_agent_100x_checkpoint_sync | 843 ms | 832 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_10x_checkpoint_sync | 93.9 ms | 92.8 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_100x_checkpoint_sync | 923 ms | 914 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | react_agent_10x_checkpoint | 46.7 ms | 46.3 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_15x600 | 27.1 ms | 26.9 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | react_agent_10x | 31.0 ms | 30.8 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_25x300 | 23.2 ms | 23.1 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_15x600_sync | 16.6 ms | 16.5 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | Geometric mean | (ref) | 1.00x faster | +-----------------------------------------+---------+-----------------------+ Benchmark hidden because not significant (19): react_agent_10x_checkpoint_sync, fanout_to_subgraph_10x_checkpoint, wide_state_25x300_sync, fanout_to_subgraph_100x_checkpoint, wide_state_25x300_checkpoint_sync, wide_state_9x1200_sync, wide_state_25x300_checkpoint, react_agent_100x_checkpoint, react_agent_100x, react_agent_10x_sync, wide_state_9x1200, fanout_to_subgraph_10x_sync, wide_state_15x600_checkpoint, fanout_to_subgraph_100x_sync, react_agent_100x_sync, fanout_to_subgraph_10x, wide_state_15x600_checkpoint_sync, wide_state_9x1200_checkpoint, wide_state_9x1200_checkpoint_sync