sandeep-krishnamurthy commented on a change in pull request #15132: Profiler 
API Enhancements
URL: https://github.com/apache/incubator-mxnet/pull/15132#discussion_r293512068
 
 

 ##########
 File path: tests/python/unittest/test_profiler.py
 ##########
 @@ -232,6 +234,44 @@ def test_continuous_profile_and_instant_marker():
     print(debug_str)
     profiler.set_state('stop')
 
+def test_aggregate_stats_valid_json_return():
+    file_name = 'test_aggregate_stats_json_return.json'
+    enable_profiler(file_name, True, True, True)
+    test_profile_event(False)
+    debug_str = profiler.dumps(format = 'json')
+    assert(len(debug_str) > 0)
+    target_dict = json.loads(debug_str)
+    print(target_dict)
+    assert "Memory" in target_dict and "Time" in target_dict and "Unit" in 
target_dict
+    profiler.set_state('stop')
+
+def test_aggregate_stats_sorting():
+    sort_by_options = {'avg': "Avg", 'min': "Min", 'max': "Max", 'count': 
"Count"}
+    ascending_options = [False, True]
+    def check_ascending(lst, asc):
+        print(lst, sorted(lst, reverse = not asc))
 
 Review comment:
   remove print

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to