Skip to content

Performance Test Results

Project Information

Description:

This performance test compares two implementations of internationalization: i18n-micro and i18n. The main focus of the test is to evaluate build times, memory usage, CPU usage, and the performance of the server under stress (e.g., how many requests can be handled and how efficiently). The i18n-micro implementation shows slightly lower overall script execution times. This difference is attributed to its ability to handle more requests, which requires additional time for processing.

Important Note:

It is essential to recognize that the example used in this test is not entirely representative of the intended usage pattern for i18n-micro. The example simplifies the translation structure by consolidating all translations into a single file. However, i18n-micro is optimized for scenarios where translations are organized on a per-page basis. This approach allows for more granular control and efficiency, particularly in large-scale applications. The current setup is used merely for demonstration purposes and may not fully showcase the potential performance benefits of i18n-micro in real-world applications.


Build Performance for ./test/fixtures/i18n v9

  • Build Time: 17.57 seconds
  • Max CPU Usage: 237.10%
  • Min CPU Usage: 105.20%
  • Average CPU Usage: 163.19%
  • Max Memory Usage: 3379.36 MB
  • Min Memory Usage: 245.47 MB
  • Average Memory Usage: 1574.95 MB

Build Performance for ./test/fixtures/i18n-micro

  • Build Time: 5.91 seconds
  • Max CPU Usage: 230.40%
  • Min CPU Usage: 185.20%
  • Average CPU Usage: 202.98%
  • Max Memory Usage: 957.03 MB
  • Min Memory Usage: 189.47 MB
  • Average Memory Usage: 540.89 MB

⏱️ Build Time and Resource Consumption

i18n
  • Build Time: 17.57 seconds
  • Max CPU Usage: 237.10%
  • Max Memory Usage: 3379.36 MB
i18n-micro
  • Build Time: 5.91 seconds
  • Max CPU Usage: 230.40%
  • Max Memory Usage: 957.03 MB

Performance Comparison

  • i18n-micro: 5.91 seconds, Max Memory: 957.03 MB, Max CPU: 230.40%
  • i18n: 17.57 seconds, Max Memory: 3379.36 MB, Max CPU: 237.10%
  • Time Difference: -11.66 seconds
  • Memory Difference: -2422.33 MB
  • CPU Usage Difference: -6.70%

Stress Test with Artillery for ./test/fixtures/i18n v9

  • Max CPU Usage: 160.60%
  • Min CPU Usage: 0.00%
  • Average CPU Usage: 109.79%
  • Max Memory Usage: 514.97 MB
  • Min Memory Usage: 47.61 MB
  • Average Memory Usage: 335.96 MB
  • Stress Test Time: 75.57 seconds
  • Average Response Time: 1474.00 ms
  • Min Response Time: 13.00 ms
  • Max Response Time: 9965.00 ms
  • Requests per Second: 82.00
  • Error Rate: 0.00%

Stress Test with Artillery for ./test/fixtures/i18n-micro

  • Max CPU Usage: 133.10%
  • Min CPU Usage: 0.00%
  • Average CPU Usage: 92.00%
  • Max Memory Usage: 333.81 MB
  • Min Memory Usage: 48.14 MB
  • Average Memory Usage: 276.33 MB
  • Stress Test Time: 68.51 seconds
  • Average Response Time: 377.90 ms
  • Min Response Time: 1.00 ms
  • Max Response Time: 2619.00 ms
  • Requests per Second: 298.00
  • Error Rate: 0.00%

Comparison between i18n v9 and i18n-micro

  • Max Memory Used Difference: -181.16 MB
  • Min Memory Used Difference: 0.53 MB
  • Avg Memory Used Difference: -59.63 MB
  • Max CPU Usage Difference: -27.50%
  • Min CPU Usage Difference: 0.00%
  • Avg CPU Usage Difference: -17.80%
  • Stress Test Time Difference: 0.00 seconds
  • Average Response Time Difference: -1096.10 ms
  • Min Response Time Difference: -12.00 ms
  • Max Response Time Difference: -7346.00 ms
  • Requests Per Second Difference: 216.00
  • Error Rate Difference: 0.00%

📊 Detailed Performance Analysis

🔍 Test Logic Explanation

The performance tests conducted for Nuxt I18n Micro and nuxt-i18n are designed to simulate real-world usage scenarios. Below is an overview of the key aspects of the test methodology:

  1. Build Time: Measures the time required to build the project, focusing on how efficiently each module handles large translation files.
  2. CPU Usage: Tracks the CPU load during the build and stress tests to assess the impact on server resources.
  3. Memory Usage: Monitors memory consumption to determine how each module manages memory, especially under high load.
  4. Stress Testing: Simulates a series of requests to evaluate the server's ability to handle concurrent traffic. The test is divided into two phases:
    • Warm-up Phase: Over 6 seconds, one request per second is sent to each of the specified URLs, with a maximum of 6 users, to ensure that the server is ready for the main test.
    • Main Test Phase: For 60 seconds, the server is subjected to 60 requests per second, spread across various endpoints, to measure response times, error rates, and overall throughput under load.

🛠 Why This Approach?

The chosen testing methodology is designed to reflect the scenarios that developers are likely to encounter in production environments. By focusing on build time, CPU and memory usage, and server performance under load, the tests provide a comprehensive view of how each module will perform in a large-scale, high-traffic application.

Nuxt I18n Micro is optimized for:

  • Faster Build Times: By reducing the overhead during the build process.
  • Lower Resource Consumption: Minimizing CPU and memory usage, making it suitable for resource-constrained environments.
  • Better Handling of Large Projects: With a focus on scalability, ensuring that applications remain responsive even as they grow.

Released under the MIT License.