Skip to content

set default params for quick test and add scenario5 #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

minhuinie
Copy link
Contributor

Description

Please briefly describe the code changes in this pull request.

Jira: https://jira.taosdata.com:18080/browse/TD-

Checklist

Please check the items in the checklist if applicable.

  • Is the user manual updated?
  • Are the test cases passed and automated?
  • Is there no significant decrease in test coverage?

@tomchon tomchon requested a review from Copilot April 17, 2025 11:10
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 6 changed files in this pull request and generated 1 comment.

Files not reviewed (5)
  • scripts/tsdbComp/full_cycle_minitest_loading.sh: Language not supported
  • scripts/tsdbComp/full_cycle_minitest_query_loading.sh: Language not supported
  • scripts/tsdbComp/install_env.sh: Language not supported
  • scripts/tsdbComp/load_all_cases.sh: Language not supported
  • scripts/tsdbComp/tsbs_test.sh: Language not supported
Comments suppressed due to low confidence (1)

scripts/tsdbComp/load_report.py:175

  • Ensure that 'figure' is correctly imported from matplotlib.pyplot or replace it with 'plt.figure' so that the code is consistent with later calls to plt.subplot, plt.savefig, and plt.close.
    fig = figure(figsize=(12, 10), dpi=300, layout='constrained')

@tomchon tomchon requested a review from Copilot April 19, 2025 03:09
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new disk usage chart mode for quick test visualizations and adds support for an authentication token for InfluxDB 3.0 across several components.

  • Updated command-line arguments and chart generation code in the Python reporting script to support a new "diskusage" mode.
  • Enhanced Influx target and query/load components in Go to handle an additional "auth-token" parameter, and adjusted HTTP client and request handling accordingly.
  • Modified the database creator to include an authentication header, although the header format is inconsistent with other components.

Reviewed Changes

Copilot reviewed 8 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/tsdbComp/load_report.py Added diskusage chart creation logic and updated the --mode argument options.
pkg/targets/influx3/implemented_target.go Introduced a new flag for authentication token.
cmd/tsbs_run_queries_influx3/main.go Added authToken handling for queries via a new flag.
cmd/tsbs_run_queries_influx3/http_client.go Updated HTTP client to include authorization header.
cmd/tsbs_load_influx3/main.go Enabled authToken parsing and validation for load operations.
cmd/tsbs_load_influx3/http_writer_test.go Adjusted tests to accommodate the new initializeReq signature.
cmd/tsbs_load_influx3/http_writer.go Modified request initialization to incorporate the auth token parameter.
cmd/tsbs_load_influx3/creator.go Updated database creator HTTP requests to include authentication in headers.
Files not reviewed (9)
  • scripts/tsdbComp/common.sh: Language not supported
  • scripts/tsdbComp/full_cycle_minitest_loading.sh: Language not supported
  • scripts/tsdbComp/full_cycle_minitest_query.sh: Language not supported
  • scripts/tsdbComp/full_cycle_minitest_query_loading.sh: Language not supported
  • scripts/tsdbComp/install_env.sh: Language not supported
  • scripts/tsdbComp/load_all_cases.sh: Language not supported
  • scripts/tsdbComp/query_test.sh: Language not supported
  • scripts/tsdbComp/test.ini: Language not supported
  • scripts/tsdbComp/tsbs_test.sh: Language not supported

textcoords="offset points",
ha='center', va='bottom')

ax.set_ylabel('(MB))')
Copy link
Preview

Copilot AI Apr 19, 2025

Choose a reason for hiding this comment

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

There is an extra closing parenthesis in the Y-axis label. Consider changing '(MB))' to '(MB)'.

Suggested change
ax.set_ylabel('(MB))')
ax.set_ylabel('(MB)')

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

@@ -100,6 +106,7 @@ func (d *dbCreator) CreateDB(dbName string) error {

// Set the content type to application/json
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+authToken)
Copy link
Preview

Copilot AI Apr 19, 2025

Choose a reason for hiding this comment

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

The authentication header uses the 'Bearer' prefix here, which is inconsistent with the 'Token' prefix used elsewhere. Standardize the auth header format across the codebase.

Suggested change
req.Header.Set("Authorization", "Bearer "+authToken)
req.Header.Set("Authorization", "Token "+authToken)

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant