GWicke has uploaded a new change for review.
https://gerrit.wikimedia.org/r/130543
Change subject: WIP Bug 64171: Log Parsoid request timings to eventlogging
......................................................................
WIP Bug 64171: Log Parsoid request timings to eventlogging
The VE extension is in the best position to record relevant performance
statistics about the Parsoid HTTP API. This patch measures the timings and
sets up calls to eventlogging.
It does not include the necessary changes in EventLogging itself, such as a
schema definition. Help with that aspect would be appreciated.
Change-Id: I5d91fa73b180d413845c0310f96ab0a92800de3e
---
M ApiVisualEditor.php
M lib/ve
2 files changed, 18 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/43/130543/1
diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index c023eca..4db786a 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -109,7 +109,14 @@
$restoring = $revision && !$revision->isCurrent();
$oldid = $parserParams['oldid'];
+ $time_start = microtime(true);
+
$content = $this->requestParsoid( 'GET', $title,
$parserParams );
+
+ // Log timing info
+ efLogServerSideEvent( 've-parsoid-getHTML', 0, array(
+ 'duration' => microtime(true) - $time_start
+ ) );
if ( $content === false ) {
return false;
@@ -153,12 +160,22 @@
if ( $parserParams['oldid'] === 0 ) {
$parserParams['oldid'] = '';
}
- return $this->requestParsoid( 'POST', $title,
+
+ $time_start = microtime(true);
+
+ $content = $this->requestParsoid( 'POST', $title,
array(
'content' => $html,
'oldid' => $parserParams['oldid'],
)
);
+
+ // Log timing info
+ efLogServerSideEvent( 've-parsoid-postHTML', 0, array(
+ 'duration' => microtime(true) - $time_start
+ ) );
+
+ return $content;
}
protected function parseWikitextFragment( $title, $wikitext ) {
diff --git a/lib/ve b/lib/ve
index d21c272..31fb320 160000
--- a/lib/ve
+++ b/lib/ve
-Subproject commit d21c272adfbba03a02f7242e02ceed2d3024a559
+Subproject commit 31fb32026d3c9186dc257c4132ce5f34ec803b25
--
To view, visit https://gerrit.wikimedia.org/r/130543
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d91fa73b180d413845c0310f96ab0a92800de3e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits