Last active
November 18, 2020 09:08
-
-
Save shubhamkumar13/6b699a1b4a6c6b1f578e42d2358f2505 to your computer and use it in GitHub Desktop.
compare the diffs inside the logs generated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> f = open("/home/sk/ocaml/diff_linear.log", "r") | |
| >>> f1 = f.readlines() | |
| >>> counter = 0 | |
| >>> for x in f1: | |
| ... counter += 1 | |
| ... | |
| >>> print(counter) | |
| 163 | |
| >>> counter = 0 | |
| >>> for x in f1: | |
| ... if x == '> this is inside caml_request_minor_gc\n': | |
| ... counter += 1 | |
| ... | |
| >>> print(counter) | |
| 39 | |
| >>> counter_2 = 0 | |
| >>> for x in f1: | |
| ... if x == '< this is inside caml_request_minor_gc\n': | |
| ... counter_2 += 1 | |
| ... | |
| >>> print(counter_2) | |
| 25 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment