You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "Superskyyy (via GitHub)" <gi...@apache.org> on 2023/05/24 18:23:41 UTC

[GitHub] [skywalking-python] Superskyyy opened a new pull request, #310: Refactor ID generator

Superskyyy opened a new pull request, #310:
URL: https://github.com/apache/skywalking-python/pull/310

   Now it's in sync with Java agent and Go agent. Speedup is approximately 4x in ID generator and 30% in tracing core.
   
   I have more minor optimizations to be merged to this release. (timestamp + tag optimization)
   <!--
       âš ī¸ Please make sure to read this template first, pull requests that don't accord with this template
       maybe closed without notice.
       Texts surrounded by `<` and `>` are meant to be replaced by you, e.g. <framework name>, <issue number>.
       Put an `x` in the `[ ]` to mark the item as CHECKED. `[x]`
   -->
   
   <!-- ==== 🐛 Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist 👇 ====
   ### Fix <bug description or bug issue link>
   - [ ] Add a unit test to verify that the fix works.
   - [ ] Explain briefly why the bug exists and how to fix it.
        ==== 🐛 Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist 👆 ==== -->
   
   <!-- ==== 📈 Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist 👇 ====
   ### Improve the performance of <class or module or ...>
   - [ ] Add a benchmark for the improvement, refer to [the existing ones](https://github.com/apache/skywalking/blob/master/apm-commons/apm-datacarrier/src/test/java/org/apache/skywalking/apm/commons/datacarrier/LinkedArrayBenchmark.java)
   - [ ] The benchmark result.
   ```text
   <Paste the benchmark results here>
   ```
   - [ ] Links/URLs to the theory proof or discussion articles/blogs. <links/URLs here>
        ==== 📈 Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist 👆 ==== -->
   
   <!-- ==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👇 ====
   ### <Feature description>
   - [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
   - [ ] Update the documentation to include this new feature.
   - [ ] Tests(including UT, IT, E2E) are added to verify the new feature.
   - [ ] If it's UI related, attach the screenshots below.
   - [ ] I have rebuilt the `Configuration.md` documentation by running `make doc-gen`
        ==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👆 ==== -->
   
   <!-- ==== 📱 Remove this line WHEN AND ONLY WHEN you're adding or modifying a plugin instrumentation, follow the checklist 👇 ====
   ### <Feature description>
   - [ ] If adding a new plugin, add a component id in [the main repo](https://github.com/apache/skywalking/blob/master/oap-server/server-starter/src/main/resources/component-libraries.yml)
   - [ ]  If adding a new plugin, add a logo in [the UI repo](https://github.com/apache/skywalking-booster-ui/tree/main/src/assets/img/technologies)
   - [ ] I have added the library to `pyproject.toml` (plugin group) by running `poetry add library --group plugins`
   - [ ] I have rebuilt the `Plugins.md` documentation by running `make doc-gen`
        ==== 📱 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👆 ==== -->
   
   - [x] If this pull request closes/resolves/fixes an existing issue, replace the issue url. Closes: https://github.com/apache/skywalking/issues/10849
   - [x] Update the [`CHANGELOG.md`](https://github.com/apache/skywalking-python/blob/master/CHANGELOG.md).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking-python] Superskyyy commented on pull request #310: Refactor ID generator

Posted by "Superskyyy (via GitHub)" <gi...@apache.org>.
Superskyyy commented on PR #310:
URL: https://github.com/apache/skywalking-python/pull/310#issuecomment-1561770949

   This is prone to error, I will add few unit tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking-python] Superskyyy commented on a diff in pull request #310: Refactor ID generator

Posted by "Superskyyy (via GitHub)" <gi...@apache.org>.
Superskyyy commented on code in PR #310:
URL: https://github.com/apache/skywalking-python/pull/310#discussion_r1204615198


##########
skywalking/bootstrap/hooks/uwsgi_hook.py:
##########
@@ -35,6 +35,7 @@
 """
 from uwsgidecorators import postfork
 from skywalking import agent, config
+from skywalking.trace import GlobalIDGenerator

Review Comment:
   this is odd, seems false positive.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking-python] Superskyyy commented on a diff in pull request #310: Refactor ID generator

Posted by "Superskyyy (via GitHub)" <gi...@apache.org>.
Superskyyy commented on code in PR #310:
URL: https://github.com/apache/skywalking-python/pull/310#discussion_r1204615198


##########
skywalking/bootstrap/hooks/uwsgi_hook.py:
##########
@@ -35,6 +35,7 @@
 """
 from uwsgidecorators import postfork
 from skywalking import agent, config
+from skywalking.trace import GlobalIDGenerator

Review Comment:
   this is odd



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking-python] Superskyyy closed pull request #310: Refactor ID generator

Posted by "Superskyyy (via GitHub)" <gi...@apache.org>.
Superskyyy closed pull request #310: Refactor ID generator
URL: https://github.com/apache/skywalking-python/pull/310


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking-python] sonatype-lift[bot] commented on a diff in pull request #310: Refactor ID generator

Posted by "sonatype-lift[bot] (via GitHub)" <gi...@apache.org>.
sonatype-lift[bot] commented on code in PR #310:
URL: https://github.com/apache/skywalking-python/pull/310#discussion_r1204611352


##########
skywalking/bootstrap/hooks/uwsgi_hook.py:
##########
@@ -35,6 +35,7 @@
 """
 from uwsgidecorators import postfork
 from skywalking import agent, config
+from skywalking.trace import GlobalIDGenerator

Review Comment:
   <picture><img alt="6% of developers fix this issue" src="https://lift.sonatype.com/api/commentimage/fixrate/6/display.svg"></picture>
   
   <b>*[E0611](https://pylint.readthedocs.io/en/v2.17.1/user_guide/messages/error/no-name-in-module.html):</b>*  No name 'GlobalIDGenerator' in module 'skywalking.trace'
   
   ---
   
   <details><summary>â„šī¸ Expand to see all <b>@sonatype-lift</b> commands</summary>
   
   You can reply with the following commands. For example, reply with ***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified `file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) to add LiftBot to another repo.</sub></details>
   
   



##########
skywalking/bootstrap/hooks/uwsgi_hook.py:
##########
@@ -35,6 +35,7 @@
 """
 from uwsgidecorators import postfork
 from skywalking import agent, config
+from skywalking.trace import GlobalIDGenerator

Review Comment:
   <picture><img alt="13% of developers fix this issue" src="https://lift.sonatype.com/api/commentimage/fixrate/13/display.svg"></picture>
   
   <b>*reportGeneralTypeIssues:</b>*  "GlobalIDGenerator" is unknown import symbol
   
   ---
   
   <details><summary>â„šī¸ Expand to see all <b>@sonatype-lift</b> commands</summary>
   
   You can reply with the following commands. For example, reply with ***@sonatype-lift ignoreall*** to leave out all findings.
   | **Command** | **Usage** |
   | ------------- | ------------- |
   | `@sonatype-lift ignore` | Leave out the above finding from this PR |
   | `@sonatype-lift ignoreall` | Leave out all the existing findings from this PR |
   | `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified `file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
   
   **Note:** When talking to LiftBot, you need to **refresh** the page to see its response.
   <sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) to add LiftBot to another repo.</sub></details>
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org