是否有用于负载测试PLSQL的工具

编程入门 行业动态 更新时间:2024-10-27 22:25:51
本文介绍了是否有用于负载测试PLSQL的工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我知道用于单元测试的utplsql,有没有办法在循环中使用它来对存储过程进行负载测试?

I know of utplsql for unit testing, is there a way I could use this in a loop to load test my stored procedure?

我不想使用JMeter或使用任何JDBC驱动程序-只是想分析香草存储过程的性能

I dont want to use JMeter or go through any JDBC drivers - just trying to analyze the performance of the vanilla Stored Proc

推荐答案

我认为单元测试工具不是正确的方法,因为您并没有真正对功能进行断言.通过负载测试,您想知道一个过程如何处理大量数据,以及是否被多次调用.

I don't think a unit test tool is the right approach, because you're not really making assertions about functionality. With a load test you want to know how a procedure runs with a large volume of data, of if it's called lots of times.

因此,您可能希望循环运行或针对大表运行它,并使用探查器查找毛刺.如果您使用的是11g,则应查看内置的分层探查器.

So you might want to run it in a loop or against a big table and use a profiler to find bootlenecks. If you're on 11g you should check out the built-in hierarchical profiler.

类似这样的东西:

begin DBMS_HPROF.START_PROFILING ( location => 'PROF_DATA_FILE_DIR' , filename => 'HPROF_RUN1_20111109' ); some_pkg.generate_lots_of_work(p_id => 1234); DBMS_HPROF.STOP_PROFILING; end; /

或循环:

begin DBMS_HPROF.START_PROFILING ( location => 'PROF_DATA_FILE_DIR' , filename => 'HPROF_RUN2_20111109' ); for i in 1..1000 loop some_pkg.do_this(p_num => i); end loop; DBMS_HPROF.STOP_PROFILING; end; /

很显然,这不会帮助您生成用于负载测试的数据块.这始终是最难的部分:)

Obviously, this won't help you in generating the gobs of data for load testing. That's always the hardest part :)

更多推荐

是否有用于负载测试PLSQL的工具

本文发布于:2023-08-05 20:41:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1307949.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:负载   测试   工具   PLSQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!