Skip to content

K6 dynamic#140

Open
JRNukala wants to merge 132 commits into
mainfrom
k6-dynamic
Open

K6 dynamic#140
JRNukala wants to merge 132 commits into
mainfrom
k6-dynamic

Conversation

@JRNukala

Copy link
Copy Markdown

Tool
k6 (dynamic tool)

Evidence of installation
First installed brew then followed these commands.
IMG_4599
IMG_0644

Below is the script that was made to test different stress testing situations. The script can easily be configured differently.
IMG_1973

Evidence of successfully running the tool
IMG_0644

Artifacts changed in this PR:

eslint.config.mjs (config for k6 script to work properly)
script.js (Run the code for k6 to work properly)

Pros

  • Runs very fast
  • Very easy to install and follow instructions on their website to get it all running. The even have a beginning script for what to run.
  • Easy to run locally if something breaks with stress testing with the amount of users to correct before commit.
  • Shows a very real possibility in how the app can break but without needing to create 100s of users.
  • Displays only the necessary information to understand if it worked or not under the stress testing.

Cons

  • Doesn't look too specific to point out where the problem would be if it fails it just shows the latency and passed and failed tests.
  • Stress Testing is limited to the computer's constraints. If we want to test a very high number of users even if the server can handle it, it could be limited by computer.

oliverhgraham and others added 30 commits February 4, 2026 00:19
Eugenehwng and others added 30 commits February 28, 2026 01:37
US4 Task 5: Incoming Follow Requests section under user/<username>/follow-requests
adding additional tests to validate the new features and make sure that they work as expected
PR Description: Dynamic Analysis with Clinic.js (Oliver Graham)
This PR integrates and evaluates Clinic.js for dynamic analysis of NodeBB.

Evidence of Installation
Added clinic to devDependencies in 
package.json
 (Line 169).
Verified installation with npm install.
Evidence of Execution
Successfully ran clinic doctor on a representative test script (
test-task2.js
) which exercises core logic.
Artifacts: Generated HTML report 
.clinic/3306.clinic-doctor.html
 (1.9 MB).
Terminal Output:
text
npx clinic doctor -- node test-task2.js
To generate the report press: Ctrl + C
--- Task 2 Verification (Burn-in) ---
--- Burn-in Complete ---
Analysing data       
Generated HTML file is file://.../.clinic/3306.clinic-doctor.html
Assessment: Clinic.js
Qualitative Review
Clinic.js provides a high-level overview of process health. The "Doctor" tool is excellent for a priori evaluation to see if there are any immediate red flags in CPU usage or event loop delays.

Strengths: The visualization is extremely intuitive. It clearly separates "Node.js" metrics from "System" metrics.
Weaknesses: It is highly dependent on the application being able to bootstrap. In environments without Redis, the tool fails immediately as it cannot profile a crashed process.
Quantitative Review
CPU Usage: During the 10-second burn-in, CPU usage remained stable, indicating no immediate infinite loops in the tested logic.
Event Loop Delay: Remained under 10ms, suggesting the asynchronous mock logic is efficient.
Memory: RSS usage was significantly lower than the heap limit, indicating no immediate leaks during the test period.
Customization
A Priori (Initial Setup): Minimal customization needed. One can specify the sample rate or the categories of data to collect (e.g., --collect-v8-events). For NodeBB, it was necessary to wrap logic in a "burn-in" loop to ensure enough data points were collected (at least 10 seconds).
Over Time (Maintenance): Over time, we can integrate clinic bubbleprof to map out the asynchronous dependency graph of NodeBB, which requires more specific "tags" in the code to identify different internal modules if the default visualization becomes too cluttered.
Conclusion
Clinic.js is a powerful dynamic analysis tool that provides deep insights into performance. It is a superior choice for identifying "hidden" bottlenecks that static analysis would miss.
Integrate JSHint Static Analysis Tool
Artillery dynamic analysis tool
Static Analysis Tool - Retire.js
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.

5 participants