Skip to content

Commit

Permalink
Add sphinx extensions for tree and issues (#219)
Browse files Browse the repository at this point in the history
Adding sphinx extensions for sha references and issues

Signed-off-by: Alan Chiu <[email protected]>

For an explanation of how to fill out the fields, please see the relevant section
in [PULL_REQUESTS.md](https://github.com/envoyproxy/envoy/blob/master/PULL_REQUESTS.md)

Description: add sphinx extensions for tree and issues
Risk Level: low
Testing: local
Docs Changes: /docs
Release Notes:
[Optional Fixes #Issue]
[Optional Deprecated:]

Signed-off-by: JP Simard <[email protected]>
  • Loading branch information
Alan Chiu authored and jpsim committed Nov 28, 2022
1 parent 4c4d9c0 commit 9a01fea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions mobile/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ def setup(app):
# ones.
extensions = ['sphinxcontrib.httpdomain', 'sphinx.ext.extlinks', 'sphinx.ext.ifconfig']
extlinks = {
'issue': ('https://github.com/lyft/envoy-mobile/issues/%s', ''),
'repo': ('https://github.com/lyft/envoy-mobile/blob/{}/%s'.format(blob_sha), ''),
'tree': ('https://github.com/lyft/envoy-mobile/tree/%s', ''),
}

# Set up global substitutions
Expand Down
24 changes: 12 additions & 12 deletions mobile/docs/root/development/performance/cpu_battery_impact.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Analysis of CPU/battery impact

Modified versions of the "hello world" example apps were used to run these experiments:

- `Android control app <https://github.com/lyft/envoy-mobile/tree/8636711/examples/kotlin/control>`_
- `Android Envoy app <https://github.com/lyft/envoy-mobile/tree/8636711/examples/kotlin/hello_world>`_
- `iOS control app <https://github.com/lyft/envoy-mobile/tree/f05d43f/examples/objective-c/control/control>`_
- `iOS Envoy app <https://github.com/lyft/envoy-mobile/tree/f05d43f/examples/objective-c/xcode_variant/EnvoyObjc/EnvoyObjc>`_
- :tree:`Android control app <8636711/examples/kotlin/control>`
- :tree:`Android Envoy app <8636711/examples/kotlin/hello_world>`
- :tree:`iOS control app <f05d43f/examples/objective-c/control/control>`
- :tree:`iOS Envoy app <f05d43f/examples/objective-c/xcode_variant/EnvoyObjc/EnvoyObjc>`

- **Control** - Made a request every ``200ms`` to an endpoint without Envoy compiled in the app.
- **Envoy** - Made the same request at the same interval, but routed through an instance of Envoy.
Expand All @@ -21,7 +21,7 @@ Results
iOS
---

Valid through SHA `f05d43f <https://github.com/lyft/envoy-mobile/tree/f05d43f>`_.
Valid through SHA :tree:`f05d43f <f05d43f>`.

Envoy:

Expand All @@ -36,12 +36,12 @@ Control:
- Battery: 1/20 Xcode Instruments score

**Based on these results, memory usage is similar. However, CPU (and consequently battery) usage is very high.**
The root cause has been identified and is being tracked in `issue 215 <https://github.com/lyft/envoy-mobile/issues/215>`_.
The root cause has been identified and is being tracked in :issue:`issue 215 <215>`.

Android
-------

Valid through SHA `8636711 <https://github.com/lyft/envoy-mobile/tree/8636711>`_.
Valid through SHA :tree:`8636711 <8636711>`.

TODO(buildbreaker): Update battery percentages

Expand All @@ -65,7 +65,7 @@ Experimentation method
iOS
---

The original investigation was completed as part of `this issue <https://github.com/lyft/envoy-mobile/issues/113>`_.
The original investigation was completed as part of :issue:`this issue <113>`.

For analysis, the `Energy Diagnostics tool from Xcode Instruments <https://developer.apple.com/library/archive/documentation/Performance/Conceptual/EnergyGuide-iOS/MonitorEnergyWithInstruments.html>`_
was used.
Expand Down Expand Up @@ -124,14 +124,14 @@ iOS
Envoy had a reasonable increase in memory usage of a few megabytes compared to control.

CPU/battery usage, however, was much higher. After some digging, the largest contributor to this usage
was `identified as a poller <https://github.com/lyft/envoy-mobile/issues/113#issuecomment-505676324>`_.
was :issue:`identified as a poller <113#issuecomment-505676324>`.

Upon further investigation, the `root cause was determined <https://github.com/lyft/envoy-mobile/issues/113#issuecomment-507425528>`_
Upon further investigation, the :issue:`root cause was determined <113#issuecomment-507425528>`
to be that ``poll_dispatch`` was being used by ``libevent`` instead of the much more performant ``kqueue``.
Forcing ``libevent`` to use ``kqueue`` reduced the CPU usage **from >= 100% down to ~3%**.
This issue and the subsequent fix are being tracked `here <https://github.com/lyft/envoy-mobile/issues/215>`_.
This issue and the subsequent fix are being tracked :issue:`here <215>`.

`We used Wireshark <https://github.com/lyft/envoy-mobile/issues/113#issuecomment-505673869>`_ to validate that
:issue:`We used Wireshark <113#issuecomment-505673869>` to validate that
network traffic was flowing through Envoy on the phone every ``200ms``, giving us confidence that there was
no additional caching happening within ``URLSession``.

Expand Down

0 comments on commit 9a01fea

Please sign in to comment.