details: https://code.openbravo.com/erp/devel/pi/rev/8ca5a1c79fda
changeset: 13321:8ca5a1c79fda
user: Iván Perdomo <ivan.perdomo <at> openbravo.com>
date: Thu Jul 28 12:48:25 2011 +0200
summary: Fixes issue 18015: Avoid network roundtrip in the test
- Use only Window.create, pure client side performace
- Remove the call to the server on each open tab
diffstat:
modules/org.openbravo.client.kernel/web/org.openbravo.client.kernel/benchmark/index.html
| 50 +++------
1 files changed, 19 insertions(+), 31 deletions(-)
diffs (65 lines):
diff -r 021aea273863 -r 8ca5a1c79fda
modules/org.openbravo.client.kernel/web/org.openbravo.client.kernel/benchmark/index.html
---
a/modules/org.openbravo.client.kernel/web/org.openbravo.client.kernel/benchmark/index.html
Thu Jul 28 12:36:33 2011 +0200
+++
b/modules/org.openbravo.client.kernel/web/org.openbravo.client.kernel/benchmark/index.html
Thu Jul 28 12:48:25 2011 +0200
@@ -32,36 +32,24 @@
var isomorphicDir='../../org.openbravo.userinterface.smartclient/isomorphic/';
function OBStartApplication() {
- var s = document.getElementById('summary');
-
- if(OB.User.roleName.indexOf('System Administrator') == -1) {
- s.innerHTML = 'Test must be executed with System Administrator role';
- return;
- }
- OB.Layout.initialize();
- // _101 = Reference view definition
-
$LAB.script('../../../org.openbravo.client.kernel/OBUIAPP_MainLayout/View?viewId=_101')
- .wait(function() {
-
- var viewName = OB.Layout.ViewManager.loadedWindowClassName,
- suite = new Benchmark.Suite, summary = '', a = [], i = 0;
-
- s.innerHTML = 'Executing...';
-
- suite.add('ViewManager.openView', function() {
- OB.ViewManager.openView(viewName, {});
- })
- .on('cycle', function(bench) {
- summary += String(bench) + '<br />';
- summary += 'Elapsed time: ' + bench.times.elapsed + '<br />';
- })
- .on('complete', function() {
- summary += 'Client platform: ' + String(Benchmark.platform) + '<br
/>';
- summary += 'Total tabs created: ' + OB.MainView.TabSet.tabs.length;
- s.innerHTML = summary;
- })
- .run(true);
- });
+ var s = document.getElementById('summary'),
+ suite = new Benchmark.Suite,
+ summary = '';
+
+ s.innerHTML = 'Executing...';
+
+ suite.add('Window.create', function() {
+ isc.Window.create({title: 'Test Window'});
+ })
+ .on('cycle', function(bench) {
+ summary += String(bench) + '<br />';
+ summary += 'Elapsed time: ' + bench.times.elapsed + '<br />';
+ })
+ .on('complete', function() {
+ summary += 'Client platform: ' + String(Benchmark.platform) + '<br />';
+ s.innerHTML = summary;
+ })
+ .run(true);
}
</script>
</head>
@@ -73,4 +61,4 @@
<iframe name="background_target" id="background_target" height="0" width="0"
style="display:none;"></iframe>
<form name="OBGlobalHiddenForm" method="post" action="blank.html"
target="background_target"></form>
</body>
-</html>
+</html>
\ No newline at end of file
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits