You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/04/08 23:02:03 UTC

[GitHub] [incubator-druid] vogievetsky commented on a change in pull request #7421: Add time taken by last query in SQL view

vogievetsky commented on a change in pull request #7421: Add time taken by last query in SQL view
URL: https://github.com/apache/incubator-druid/pull/7421#discussion_r273270784
 
 

 ##########
 File path: web-console/src/views/sql-view.tsx
 ##########
 @@ -62,25 +64,33 @@ export class SqlView extends React.Component<SqlViewProps, SqlViewState> {
       explainDialogOpen: false,
       loadingExplain: false,
       explainResult: null,
-      explainError: null
+      explainError: null,
+      queryElapsed: 0
     };
   }
 
   componentDidMount(): void {
     this.sqlQueryManager = new QueryManager({
       processQuery: async (query: string) => {
+        const startTime = new Date();
         if (query.trim().startsWith('{')) {
           // Secret way to issue a native JSON "rune" query
           const runeQuery = Hjson.parse(query);
-          return decodeRune(runeQuery, await queryDruidRune(runeQuery));
+          const result = await queryDruidRune(runeQuery);
+          this.setState({
 
 Review comment:
   do not call setState in `processQuery` you are making this function not pure. pass it though to `onStateChange`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org