Skip to content

add tql pragma for log-level sql-thread-lock #297

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

Merged
merged 10 commits into from
Mar 10, 2025
Merged

add tql pragma for log-level sql-thread-lock #297

merged 10 commits into from
Mar 10, 2025

Conversation

OutOfBedlam
Copy link
Contributor

This pull request introduces several enhancements and refactoring changes across multiple files, focusing on adding experimental features, improving regex usage, and adding new functionality. The most important changes include the introduction of the LockOSThread feature, refactoring regex usage, and adding a new Vector type in the nums package.

Experimental Features:

  • api/commands.go: Added LockOSThread field to CommandHandler struct and updated runSql method to set this field in the Query object. [1] [2]
  • api/do_query.go: Added lockOSThread field to Query struct and implemented SetLockOSThread method. Modified Execute method to lock the OS thread if lockOSThread is set. [1] [2] [3] [4] [5]

Regex Refactoring:

  • api/commands.go: Replaced inline regex compilation with precompiled regex variables for parseCommandLineRegex and explainFullRegex. [1] [2] [3]
  • api/options.go: Refactored SqlTidyWidth function to use a precompiled regex variable sqlTidyWidthRegexp.
  • mods/server/http.go: Refactored handleMarkdown method to use precompiled regex variables mdFileRootRegexp, mdFilePathRegexp, mdFileNameRegexp, and mdFileDirRegexp. [1] [2]

New Functionality:

  • mods/nums/vectors.go: Added a new Vector type with methods for dimension calculation, JSON marshaling/unmarshaling, and binary marshaling/unmarshaling.
  • mods/nums/vectors_test.go: Added tests for the new Vector type, covering various methods and functionalities.

Miscellaneous Improvements:

These changes improve the codebase by adding new features, optimizing performance, and enhancing maintainability.

Copy link

codecov bot commented Mar 10, 2025

Codecov Report

Attention: Patch coverage is 58.70445% with 102 lines in your changes missing coverage. Please review.

Project coverage is 41.14%. Comparing base (b61cde6) to head (11f913b).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
mods/server/svrmetric.go 0.00% 28 Missing ⚠️
mods/nums/vectors.go 85.45% 12 Missing and 4 partials ⚠️
mods/tql/task.go 48.14% 12 Missing and 2 partials ⚠️
mods/tql/task_node.go 15.38% 10 Missing and 1 partial ⚠️
api/metrics.go 0.00% 9 Missing ⚠️
mods/server/http_query.go 28.57% 4 Missing and 1 partial ⚠️
mods/server/http.go 50.00% 3 Missing and 1 partial ⚠️
mods/server/http_opts.go 0.00% 4 Missing ⚠️
mods/tql/fm_dbsrc.go 40.00% 2 Missing and 1 partial ⚠️
api/do_query.go 80.00% 1 Missing and 1 partial ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #297      +/-   ##
==========================================
+ Coverage   40.52%   41.14%   +0.61%     
==========================================
  Files         261      259       -2     
  Lines       57400    56864     -536     
==========================================
+ Hits        23262    23394     +132     
+ Misses      31800    31129     -671     
- Partials     2338     2341       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@OutOfBedlam OutOfBedlam merged commit bf9b9b4 into main Mar 10, 2025
10 checks passed
@OutOfBedlam OutOfBedlam deleted the fix-jemalloc branch March 10, 2025 03:51
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