Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-13168

Extend SQuaSH Monitor app to allow visualization of multiple verification packages

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Once SQuaSH can access data from the Flask based API deployed in DM-12603, we have to extend the Monitor app to allow visualization of metrics from different lsst.verify packages such as jointcal.

        Attachments

          Issue Links

            Activity

            Hide
            afausti Angelo Fausti added a comment -

            Impemented the display configuration helper methods. The ideia is that the API provides the default values for dataset, package, metric and specification to be loaded and displayed by the bokeh apps. This is done through a helper method get_default() in squash bokeh which wraps the REST API calls to the '/default' resource.

            Other helper methods were implemented to the get the list of datasets, packages, metrics and specifications and they also use the get_default() method to return a default value.

            Show
            afausti Angelo Fausti added a comment - Impemented the display configuration helper methods. The ideia is that the API provides the default values for dataset, package, metric and specification to be loaded and displayed by the bokeh apps. This is done through a helper method get_default() in squash bokeh which wraps the REST API calls to the '/default' resource. Other helper methods were implemented to the get the list of datasets, packages, metrics and specifications and they also use the get_default() method to return a default value.
            Hide
            afausti Angelo Fausti added a comment - - edited

            Optimizations required:

             
            [pid: 14|app: 0|req: 41/173] 10.56.0.1 () {40 vars in 748 bytes} [Tue Feb 13 23:45:32 2018] GET /metrics?package=validate_drp => generated 11451 bytes in 7933 msecs (HTTP/2.0 200) 2 headers in 74 bytes (1 switches on core 0)
            

            This join is not required but it is enforced by the

            lazy='joined'
            

            in the Metric-Measurement relationship.

            2018-02-13 16:49:24,272 INFO sqlalchemy.engine.base.Engine SELECT metric.id AS metric_id, metric.name AS metric_name, metric.package AS metric_package, metric.display_name AS metric_display_name, metric.description AS metric_description, metric.unit AS metric_unit, metric.tags AS metric_tags, metric.reference AS metric_reference, spec_1.id AS spec_1_id, spec_1.name AS spec_1_name, spec_1.threshold AS spec_1_threshold, spec_1.tags AS spec_1_tags, spec_1.metadata_query AS spec_1_metadata_query, spec_1.type AS spec_1_type, spec_1.metric_id AS spec_1_metric_id, measurement_1.id AS measurement_1_id, measurement_1.value AS measurement_1_value, measurement_1.metric_name AS measurement_1_metric_name, measurement_1.unit AS measurement_1_unit, measurement_1.metric_id AS measurement_1_metric_id, measurement_1.job_id AS measurement_1_job_id
            FROM metric LEFT OUTER JOIN spec AS spec_1 ON metric.id = spec_1.metric_id LEFT OUTER JOIN measurement AS measurement_1 ON metric.id = measurement_1.metric_id
            WHERE metric.package = %(package_1)s
            

            Using SQLAlchemy noload makes the trick to avoid these extra joins see:

            https://github.com/lsst-sqre/squash-rest-api/pull/16

            Show
            afausti Angelo Fausti added a comment - - edited Optimizations required:   [pid: 14|app: 0|req: 41/173] 10.56.0.1 () {40 vars in 748 bytes} [Tue Feb 13 23:45:32 2018] GET /metrics?package=validate_drp => generated 11451 bytes in 7933 msecs (HTTP/2.0 200) 2 headers in 74 bytes (1 switches on core 0) This join is not required but it is enforced by the lazy='joined' in the Metric-Measurement relationship. 2018-02-13 16:49:24,272 INFO sqlalchemy.engine.base.Engine SELECT metric.id AS metric_id, metric.name AS metric_name, metric.package AS metric_package, metric.display_name AS metric_display_name, metric.description AS metric_description, metric.unit AS metric_unit, metric.tags AS metric_tags, metric.reference AS metric_reference, spec_1.id AS spec_1_id, spec_1.name AS spec_1_name, spec_1.threshold AS spec_1_threshold, spec_1.tags AS spec_1_tags, spec_1.metadata_query AS spec_1_metadata_query, spec_1.type AS spec_1_type, spec_1.metric_id AS spec_1_metric_id, measurement_1.id AS measurement_1_id, measurement_1.value AS measurement_1_value, measurement_1.metric_name AS measurement_1_metric_name, measurement_1.unit AS measurement_1_unit, measurement_1.metric_id AS measurement_1_metric_id, measurement_1.job_id AS measurement_1_job_id FROM metric LEFT OUTER JOIN spec AS spec_1 ON metric.id = spec_1.metric_id LEFT OUTER JOIN measurement AS measurement_1 ON metric.id = measurement_1.metric_id WHERE metric.package = %(package_1)s Using SQLAlchemy noload makes the trick to avoid these extra joins see: https://github.com/lsst-sqre/squash-rest-api/pull/16
            Hide
            afausti Angelo Fausti added a comment -

            Added extra resources in the SQuaSH RESTful API required by the monitor app.

            https://github.com/lsst-sqre/squash-rest-api/pull/16

            Show
            afausti Angelo Fausti added a comment - Added extra resources in the SQuaSH RESTful API required by the monitor app. https://github.com/lsst-sqre/squash-rest-api/pull/16
            Hide
            afausti Angelo Fausti added a comment -

            Refactored the Monitor app. See https://github.com/lsst-sqre/squash-bokeh/pull/9

            Show
            afausti Angelo Fausti added a comment - Refactored the Monitor app. See https://github.com/lsst-sqre/squash-bokeh/pull/9
            Hide
            afausti Angelo Fausti added a comment -

            Deployed these changes to the squash-demo instance:

            https://squash-demo.lsst.codes

            Show
            afausti Angelo Fausti added a comment - Deployed these changes to the squash-demo instance: https://squash-demo.lsst.codes

              People

              Assignee:
              afausti Angelo Fausti
              Reporter:
              afausti Angelo Fausti
              Watchers:
              Angelo Fausti
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.