Skip to content

feat(llm): support record QPS by decorator#76

Merged
imbajin merged 7 commits intoapache:mainfrom
ChenZiHong-Gavin:llm-qps
Sep 1, 2024
Merged

feat(llm): support record QPS by decorator#76
imbajin merged 7 commits intoapache:mainfrom
ChenZiHong-Gavin:llm-qps

Conversation

@ChenZiHong-Gavin
Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions github-actions Bot added the llm label Aug 31, 2024
@ChenZiHong-Gavin ChenZiHong-Gavin marked this pull request as ready for review September 1, 2024 01:04
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Sep 1, 2024
result = func(*args, **kwargs)
call_count = result.get("call_count", 0)
qps = call_count / (time.perf_counter() - start)
log.debug("%s LLM QPS: %.2f", args[0].__class__.__name__, qps)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore time gap < 0.10

Comment thread hugegraph-llm/src/hugegraph_llm/operators/llm_op/keyword_extract.py Outdated
@imbajin imbajin merged commit c399b3b into apache:main Sep 1, 2024
@imbajin imbajin changed the title feat(llm): add llm qps feat(llm): support record QPS by decorator Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request llm size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants