性能问题 最近在跑flink社区1.15版本使用json_value函数时,发现其性能很差,通过jstack查看堆栈经常在执行以下堆栈 可以看到这里的逻辑是在等锁,查看jsonpath的LRUCache // // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) // package org.apache.flink.table.shaded.com.j…
在之前介绍的测试框架testtool中,发现测试结果中显示的都是测试用例的函数名,并没有将注释显示出来 这很不符合国人使用阿,没办法,自己动手来改改吧 首先,testtools是继承unittest的一个工具,所以应该存在unittest TestCase的相关函数 看看testtools.testcase原码吧,发现,不显示注释的奥秘在这里 class TestCase(unittest.TestCase): """Extensions to the basic TestC…
存在的问题 DateTime.Now是C#语言中获取计算机的当前时间的代码: 但是,在对使用了DateTime.Now的方法进行测试时,由于计算机时间的实时性,期望值一直在变化.如:计算年龄. public static class DateTimeExtensionMethods { public static int Age(this DateTime date) { DateTime now = DateTime.Now; ...... } } new DateTime(2008,8,12…