Conversation
Emitting mysql data to keep compatibility with the original mysql probe
Codecov Report
@@ Coverage Diff @@
## master #541 +/- ##
==========================================
- Coverage 58.5% 58.19% -0.31%
==========================================
Files 48 49 +1
Lines 2947 2983 +36
==========================================
+ Hits 1724 1736 +12
- Misses 1223 1247 +24
Continue to review full report at Codecov.
|
|
@realhidden - thank you for the contribution. Please read https://github.com/RuntimeTools/appmetrics/blob/master/CONTRIBUTING.md for instructions on how to contribute to appmetrics - your first PR needs to add your name into AUTHORS.md as an indication that you agree to the Contributor Licence Agreement. It doesn't seem like we have a test for the mysql probe at the moment, would you be interested in adding one for this new probe? Tests under https://github.com/RuntimeTools/appmetrics/tree/master/tests/probes are not run by default if they require something like an external database but they are useful when writing new probes, testing changes to a probe and fixing bugs. |
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| *******************************************************************************/ | ||
| 'use strict'; |
There was a problem hiding this comment.
If mysql and mysql2 have identical APIs, can this file not be module.exports = require('./mysql-probe');? This might side-step test concerns, because it wouldn't introduce any new code.
Adds a new mysql2 probe (for package https://www.npmjs.com/package/mysql2), the mysql2 package is compatible with the original mysql one, so I used the same code and emitting 'mysql' data to be 100% compatible with the original probe and the appmetrics-dash.