FunkLoad 针对多个请求的一份报告

发布于 2024-10-19 20:08:45 字数 896 浏览 3 评论 0原文

我正在使用 FunkLoad 对我的 Django 项目进行一些负载测试。 我当前正在尝试对页面加载到 (/customer/json/) 进行基准测试的页面之一(我将其命名为 /customer/ )“执行”AJAX 请求,

我目前在基准测试中所做的操作如下

self.get("/customer/", description="Customer page")
self.get("/customer/json/", description="Customer list")

:然后用两个图表报告

我想要一个图表,其中 /customer/json/ 被视为“页面资源”(比方说 style.css)

它是否可行/我是否遗漏了一些东西?

---编辑---

这是我的脏补丁,强制我的测试在每次执行 get 请求时加载媒体列表 (self.media),我知道至少有 4 个充分的理由不这样做,但是目前我可以忍受:)

class MyLoadTest(FunkLoadTestCase):

    def get(self, url, params=None, description=None, ok_codes=None):
        response = FunkLoadTestCase.get(self, url, params, description, ok_codes)
        if not self._simple_fetch:
            for media in self.media:
                self._connect("%s%s" % (self.server_url, media), [], self.ok_codes, "GET", "")
        return response

I am using FunkLoad to make some load test on my Django project.
One of the page (I will name it /customer/ ) that I am currently try to benchmark "does" an AJAX request on page load to (/customer/json/)

What I am currently doing in my benchmark is the following

self.get("/customer/", description="Customer page")
self.get("/customer/json/", description="Customer list")

that it's then reported with two graphs

I would like to have a single graph where /customer/json/ is considered as a "page resource" (let's say style.css)

Is it somehow feasible / am I missing something ?

---EDIT---

Here's my dirty patch to force my tests to load a list of media (self.media) every time I do a get request, I know that there are at least 4 good reasons to not do this way but for the moment I can live with it :)

class MyLoadTest(FunkLoadTestCase):

    def get(self, url, params=None, description=None, ok_codes=None):
        response = FunkLoadTestCase.get(self, url, params, description, ok_codes)
        if not self._simple_fetch:
            for media in self.media:
                self._connect("%s%s" % (self.server_url, media), [], self.ok_codes, "GET", "")
        return response

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眉目亦如画i 2024-10-26 20:08:45

这尚不可行,但此功能是 FunkLoad 待办事项列表的一部分:
“添加一个参数以加入下一个请求操作”

我还没有这个任务的任何精确时间表,但我一定会实现它。

问候

This is not yet feasible but this feature is part of the FunkLoad todo list:
"Add a param to join to next request action"

I have not yet any precise schedule for this task, but I will defninitly implemenet it.

Regards

ben

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文