Skip to content
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

Negative execution time #60

Open
jachinte opened this issue Sep 20, 2022 · 0 comments
Open

Negative execution time #60

jachinte opened this issue Sep 20, 2022 · 0 comments

Comments

@jachinte
Copy link

Hi,

I'm testing invokust locally with localstack, and haven't deployed to AWS yet.
Everything works well, but I'm getting a negative execution time.

This is a test result; the key total_lambda_execution_time is assigned to this negative value: -582398. It should probably be 15.6032865047 (1663692383.5552292 - 1663692367.9519427), which is consistent with the duration I set for this test (15s).

{
  "summary_stats":{
    "lambda_invocation_count":1,
    "total_lambda_execution_time":-582398,
    "requests_total":1392,
    "request_fail_ratio":0.0,
    "invocation_error_ratio":0.0
  },
  "results":[
    {
      "requests":{
        "GET_/":{
          "request_type":"GET",
          "num_requests":1392,
          "min_response_time":716.8549480848014,
          "median_response_time":2300.0,
          "avg_response_time":3316.3983788552537,
          "max_response_time":14563.939598971047,
          "response_times":{...},
          "response_time_percentiles":{...},
          "total_rps":93.70657030509588,
          "total_rpm":5622.3942183057525
        }
      },
      "failures":{},
      "num_requests":1392,
      "num_requests_fail":0,
      "start_time":1663692367.9519427,
      "end_time":1663692383.5552292,
      "remaining_time":882398,
      "function_name":"locust-function",
      "function_version":"$LATEST",
      "invoked_function_arn":"arn:aws:lambda:us-east-2:000000000000:function:locust-function",
      "memory_limit":"1536",
      "aws_request_id":"2483a0c5-3c47-150a-6b27-c9535e8eeacb",
      "log_group_name":"/aws/lambda/locust-function",
      "log_stream_name":"2022/09/20/[$LATEST]4aff2d740c665b04f425e1c3239ea985"
    }
  ]
}

This is the code I'm using to launch the test:

        load_test: LambdaLoadTest = LambdaLoadTest(
            lambda_function_name=locust_lambda_name,
            threads=threads,
            ramp_time=0,
            time_limit=duration,
            lambda_payload={
                "locust_modules": modules,
                "host": host,
                "num_users": users,
                "spawn_rate": spawn_rate,
                "run_time": f"{duration}s",
            },
        )
        load_test.run()
        result: TestResult = TestResult(
            summary_stats=load_test.get_summary_stats(),
            results=load_test.get_locust_results(),
        )
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

No branches or pull requests

1 participant