Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

50 add performance tests #57

Merged
merged 10 commits into from
May 28, 2024
Merged

50 add performance tests #57

merged 10 commits into from
May 28, 2024

Conversation

aweakley
Copy link
Member

@aweakley aweakley commented May 27, 2024

#50 Add benchmark tests, publish results in CI, activate packrat.

Results will appear at https://ixc.github.io/python-edtf/dev/bench/ as well as in comments on the commit.

Copy link

github-actions bot commented May 27, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/edtf
   __init__.py40100% 
   appsettings.py24483%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py922177%88, 93, 95, 98–99, 101–102, 104, 109, 113–116, 155, 157, 159, 169–170, 174–175, 183
   jdutil.py986632%37, 55, 91–92, 105, 152, 154–155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 251–252, 254–255, 257–258, 260, 262, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py71710%3–4, 6, 9–13, 16–21, 24–25, 28–29, 32–37, 40–44, 52–53, 56–62, 65–71, 74–79, 82–85, 88–91, 94–97, 100–107
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1487152%34, 44–45, 47–50, 55–56, 59–62, 64, 68–71, 73–74, 76–78, 86–88, 90–94, 104, 106, 119, 126, 157–159, 161–166, 169–171, 173–178, 202–205, 209, 224, 226–227, 229, 246, 248, 256, 258, 260, 262, 267, 270, 276
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/edtf/parser
   __init__.py40100% 
   edtf_exceptions.py30100% 
   grammar.py123992%147–150, 346, 350–353
   parser_classes.py54827749%69, 71, 78–81, 83–84, 86–87, 110–112, 116, 119, 122, 181, 183, 190, 192, 198–202, 207–213, 220–224, 229–235, 246, 257, 286, 290, 302–304, 309, 317–319, 322, 337–338, 342, 371–375, 378, 383–384, 387, 390, 393, 396–400, 403–407, 427–429, 453, 457, 462, 464, 478, 485, 501, 510–512, 514–516, 519–520, 522, 525–528, 530, 532–534, 536, 540, 549–551, 555, 557, 560–562, 566, 568, 573–576, 581–582, 587–588, 590, 593, 596–598, 600, 603, 606–609, 611–617, 624–627, 629–635, 644–645, 648, 651, 654–656, 658, 666, 685–687, 689–692, 694–695, 697–698, 700, 703–704, 706–707, 709, 711, 713–714, 716, 718–723, 725, 727, 729–730, 732, 735–737, 740–742, 745–747, 755, 757–758, 761–762, 765–766, 769–770, 772–773, 777, 781–782, 785, 790–791, 795–796, 798–806, 808, 818–819, 821, 823–824, 826, 829, 834, 839, 845–846, 849, 852, 855, 857–859, 861, 866–867, 869, 878–879, 882, 885, 888–889, 891, 900–901, 903–905, 907, 916–918, 923, 926–927, 929, 934
   tests.py76760%3–4, 6, 8–10, 26, 219, 233, 255, 257–260, 262–264, 266–270, 273–274, 276–277, 280–282, 285–286, 289–292, 295, 298–302, 305, 308, 311, 314–319, 322, 325, 328, 333–334, 336–337, 340, 342–347, 349–356, 359–361, 363
edtf
   __init__.py40100% 
   appsettings.py24291%12–13
   convert.py631182%11–19, 21, 73
   fields.py92920%1, 3–6, 8–10, 12, 20, 26, 28, 30–32, 35–36, 48–49, 64, 66, 69, 71–74, 76–80, 82–83, 85, 87–88, 90, 92–93, 95, 97–99, 101–102, 104, 106–109, 111, 113–116, 118, 127–129, 132, 135, 141–142, 144–146, 149, 153, 155, 157, 159, 162–175, 181, 183–184, 186–187, 192–193
   jdutil.py984455%37, 55, 91–92, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py710100% 
edtf/natlang
   __init__.py20100% 
   en.py1481192%56, 59, 119, 165–166, 177–178, 204–205, 209, 276
   tests.py10190%211
edtf/parser
   __init__.py40100% 
   edtf_exceptions.py30100% 
   grammar.py123199%352
   parser_classes.py5488484%110–112, 119, 122, 183, 189–193, 200–202, 209–213, 222–224, 229–235, 246, 337–338, 371–375, 378, 393, 396–400, 403–407, 427–429, 540, 603, 609, 613, 627, 631, 704, 722–723, 725, 730, 736, 741, 746, 782, 785, 791, 796, 798–806, 821, 826, 903, 907, 934
   tests.py76198%363
TOTAL253289664% 

Tests Skipped Failures Errors Time
249 0 💤 0 ❌ 0 🔥 2.682s ⏱️

Copy link

github-actions bot commented May 27, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/edtf
   __init__.py40100% 
   appsettings.py24483%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py922177%88, 93, 95, 98–99, 101–102, 104, 109, 113–116, 155, 157, 159, 169–170, 174–175, 183
   jdutil.py986632%37, 55, 91–92, 105, 152, 154–155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 251–252, 254–255, 257–258, 260, 262, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py71710%3–4, 6, 9–13, 16–21, 24–25, 28–29, 32–37, 40–44, 52–53, 56–62, 65–71, 74–79, 82–85, 88–91, 94–97, 100–107
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1487152%34, 44–45, 47–50, 55–56, 59–62, 64, 68–71, 73–74, 76–78, 86–88, 90–94, 104, 106, 119, 126, 157–159, 161–166, 169–171, 173–178, 202–205, 209, 224, 226–227, 229, 246, 248, 256, 258, 260, 262, 267, 270, 276
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/edtf/parser
   __init__.py40100% 
   edtf_exceptions.py30100% 
   grammar.py123992%147–150, 346, 350–353
   parser_classes.py54827749%69, 71, 78–81, 83–84, 86–87, 110–112, 116, 119, 122, 181, 183, 190, 192, 198–202, 207–213, 220–224, 229–235, 246, 257, 286, 290, 302–304, 309, 317–319, 322, 337–338, 342, 371–375, 378, 383–384, 387, 390, 393, 396–400, 403–407, 427–429, 453, 457, 462, 464, 478, 485, 501, 510–512, 514–516, 519–520, 522, 525–528, 530, 532–534, 536, 540, 549–551, 555, 557, 560–562, 566, 568, 573–576, 581–582, 587–588, 590, 593, 596–598, 600, 603, 606–609, 611–617, 624–627, 629–635, 644–645, 648, 651, 654–656, 658, 666, 685–687, 689–692, 694–695, 697–698, 700, 703–704, 706–707, 709, 711, 713–714, 716, 718–723, 725, 727, 729–730, 732, 735–737, 740–742, 745–747, 755, 757–758, 761–762, 765–766, 769–770, 772–773, 777, 781–782, 785, 790–791, 795–796, 798–806, 808, 818–819, 821, 823–824, 826, 829, 834, 839, 845–846, 849, 852, 855, 857–859, 861, 866–867, 869, 878–879, 882, 885, 888–889, 891, 900–901, 903–905, 907, 916–918, 923, 926–927, 929, 934
   tests.py76760%3–4, 6, 8–10, 26, 219, 233, 255, 257–260, 262–264, 266–270, 273–274, 276–277, 280–282, 285–286, 289–292, 295, 298–302, 305, 308, 311, 314–319, 322, 325, 328, 333–334, 336–337, 340, 342–347, 349–356, 359–361, 363
edtf
   __init__.py40100% 
   appsettings.py24291%12–13
   convert.py631182%11–19, 21, 73
   fields.py92920%1, 3–6, 8–10, 12, 20, 26, 28, 30–32, 35–36, 48–49, 64, 66, 69, 71–74, 76–80, 82–83, 85, 87–88, 90, 92–93, 95, 97–99, 101–102, 104, 106–109, 111, 113–116, 118, 127–129, 132, 135, 141–142, 144–146, 149, 153, 155, 157, 159, 162–175, 181, 183–184, 186–187, 192–193
   jdutil.py984455%37, 55, 91–92, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py710100% 
edtf/natlang
   __init__.py20100% 
   en.py1481192%56, 59, 119, 165–166, 177–178, 204–205, 209, 276
   tests.py10190%211
edtf/parser
   __init__.py40100% 
   edtf_exceptions.py30100% 
   grammar.py123199%352
   parser_classes.py5488484%110–112, 119, 122, 183, 189–193, 200–202, 209–213, 222–224, 229–235, 246, 337–338, 371–375, 378, 393, 396–400, 403–407, 427–429, 540, 603, 609, 613, 627, 631, 704, 722–723, 725, 730, 736, 741, 746, 782, 785, 791, 796, 798–806, 821, 826, 903, 907, 934
   tests.py76198%363
TOTAL253289664% 

Tests Skipped Failures Errors Time
249 0 💤 0 ❌ 0 🔥 2.450s ⏱️

Copy link

github-actions bot commented May 27, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/edtf
   __init__.py40100% 
   appsettings.py24483%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py922177%88, 93, 95, 98–99, 101–102, 104, 109, 113–116, 155, 157, 159, 169–170, 174–175, 183
   jdutil.py986632%37, 55, 91–92, 105, 152, 154–155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 251–252, 254–255, 257–258, 260, 262, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py71710%3–4, 6, 9–13, 16–21, 24–25, 28–29, 32–37, 40–44, 52–53, 56–62, 65–71, 74–79, 82–85, 88–91, 94–97, 100–107
/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1487152%34, 44–45, 47–50, 55–56, 59–62, 64, 68–71, 73–74, 76–78, 86–88, 90–94, 104, 106, 119, 126, 157–159, 161–166, 169–171, 173–178, 202–205, 209, 224, 226–227, 229, 246, 248, 256, 258, 260, 262, 267, 270, 276
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/edtf/parser
   __init__.py40100% 
   edtf_exceptions.py30100% 
   grammar.py123992%147–150, 346, 350–353
   parser_classes.py54827749%69, 71, 78–81, 83–84, 86–87, 110–112, 116, 119, 122, 181, 183, 190, 192, 198–202, 207–213, 220–224, 229–235, 246, 257, 286, 290, 302–304, 309, 317–319, 322, 337–338, 342, 371–375, 378, 383–384, 387, 390, 393, 396–400, 403–407, 427–429, 453, 457, 462, 464, 478, 485, 501, 510–512, 514–516, 519–520, 522, 525–528, 530, 532–534, 536, 540, 549–551, 555, 557, 560–562, 566, 568, 573–576, 581–582, 587–588, 590, 593, 596–598, 600, 603, 606–609, 611–617, 624–627, 629–635, 644–645, 648, 651, 654–656, 658, 666, 685–687, 689–692, 694–695, 697–698, 700, 703–704, 706–707, 709, 711, 713–714, 716, 718–723, 725, 727, 729–730, 732, 735–737, 740–742, 745–747, 755, 757–758, 761–762, 765–766, 769–770, 772–773, 777, 781–782, 785, 790–791, 795–796, 798–806, 808, 818–819, 821, 823–824, 826, 829, 834, 839, 845–846, 849, 852, 855, 857–859, 861, 866–867, 869, 878–879, 882, 885, 888–889, 891, 900–901, 903–905, 907, 916–918, 923, 926–927, 929, 934
   tests.py76760%3–4, 6, 8–10, 26, 219, 233, 255, 257–260, 262–264, 266–270, 273–274, 276–277, 280–282, 285–286, 289–292, 295, 298–302, 305, 308, 311, 314–319, 322, 325, 328, 333–334, 336–337, 340, 342–347, 349–356, 359–361, 363
edtf
   __init__.py40100% 
   appsettings.py24291%12–13
   convert.py631182%11–19, 21, 73
   fields.py92920%1, 3–6, 8–10, 12, 20, 26, 28, 30–32, 35–36, 48–49, 64, 66, 69, 71–74, 76–80, 82–83, 85, 87–88, 90, 92–93, 95, 97–99, 101–102, 104, 106–109, 111, 113–116, 118, 127–129, 132, 135, 141–142, 144–146, 149, 153, 155, 157, 159, 162–175, 181, 183–184, 186–187, 192–193
   jdutil.py984455%37, 55, 91–92, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py710100% 
edtf/natlang
   __init__.py20100% 
   en.py1481192%56, 59, 119, 165–166, 177–178, 204–205, 209, 276
   tests.py10190%211
edtf/parser
   __init__.py40100% 
   edtf_exceptions.py30100% 
   grammar.py123199%352
   parser_classes.py5488484%110–112, 119, 122, 183, 189–193, 200–202, 209–213, 222–224, 229–235, 246, 337–338, 371–375, 378, 393, 396–400, 403–407, 427–429, 540, 603, 609, 613, 627, 631, 704, 722–723, 725, 730, 736, 741, 746, 782, 785, 791, 796, 798–806, 821, 826, 903, 907, 934
   tests.py76198%363
TOTAL253289664% 

Tests Skipped Failures Errors Time
249 0 💤 0 ❌ 0 🔥 2.536s ⏱️

Copy link

github-actions bot commented May 27, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/edtf
   __init__.py40100% 
   appsettings.py24483%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py922177%88, 93, 95, 98–99, 101–102, 104, 109, 113–116, 155, 157, 159, 169–170, 174–175, 183
   jdutil.py986632%37, 55, 91–92, 105, 152, 154–155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 251–252, 254–255, 257–258, 260, 262, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py71710%3–4, 6, 9–13, 16–21, 24–25, 28–29, 32–37, 40–44, 52–53, 56–62, 65–71, 74–79, 82–85, 88–91, 94–97, 100–107
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1487152%34, 44–45, 47–50, 55–56, 59–62, 64, 68–71, 73–74, 76–78, 86–88, 90–94, 104, 106, 119, 126, 157–159, 161–166, 169–171, 173–178, 202–205, 209, 224, 226–227, 229, 246, 248, 256, 258, 260, 262, 267, 270, 276
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/edtf/parser
   __init__.py40100% 
   edtf_exceptions.py30100% 
   grammar.py123992%147–150, 346, 350–353
   parser_classes.py54827749%69, 71, 78–81, 83–84, 86–87, 110–112, 116, 119, 122, 181, 183, 190, 192, 198–202, 207–213, 220–224, 229–235, 246, 257, 286, 290, 302–304, 309, 317–319, 322, 337–338, 342, 371–375, 378, 383–384, 387, 390, 393, 396–400, 403–407, 427–429, 453, 457, 462, 464, 478, 485, 501, 510–512, 514–516, 519–520, 522, 525–528, 530, 532–534, 536, 540, 549–551, 555, 557, 560–562, 566, 568, 573–576, 581–582, 587–588, 590, 593, 596–598, 600, 603, 606–609, 611–617, 624–627, 629–635, 644–645, 648, 651, 654–656, 658, 666, 685–687, 689–692, 694–695, 697–698, 700, 703–704, 706–707, 709, 711, 713–714, 716, 718–723, 725, 727, 729–730, 732, 735–737, 740–742, 745–747, 755, 757–758, 761–762, 765–766, 769–770, 772–773, 777, 781–782, 785, 790–791, 795–796, 798–806, 808, 818–819, 821, 823–824, 826, 829, 834, 839, 845–846, 849, 852, 855, 857–859, 861, 866–867, 869, 878–879, 882, 885, 888–889, 891, 900–901, 903–905, 907, 916–918, 923, 926–927, 929, 934
   tests.py76760%3–4, 6, 8–10, 26, 219, 233, 255, 257–260, 262–264, 266–270, 273–274, 276–277, 280–282, 285–286, 289–292, 295, 298–302, 305, 308, 311, 314–319, 322, 325, 328, 333–334, 336–337, 340, 342–347, 349–356, 359–361, 363
edtf
   __init__.py40100% 
   appsettings.py24291%12–13
   convert.py631182%11–19, 21, 73
   fields.py92920%1, 3–6, 8–10, 12, 20, 26, 28, 30–32, 35–36, 48–49, 64, 66, 69, 71–74, 76–80, 82–83, 85, 87–88, 90, 92–93, 95, 97–99, 101–102, 104, 106–109, 111, 113–116, 118, 127–129, 132, 135, 141–142, 144–146, 149, 153, 155, 157, 159, 162–175, 181, 183–184, 186–187, 192–193
   jdutil.py984455%37, 55, 91–92, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py710100% 
edtf/natlang
   __init__.py20100% 
   en.py1481192%56, 59, 119, 165–166, 177–178, 204–205, 209, 276
   tests.py10190%211
edtf/parser
   __init__.py40100% 
   edtf_exceptions.py30100% 
   grammar.py123199%352
   parser_classes.py5488484%110–112, 119, 122, 183, 189–193, 200–202, 209–213, 222–224, 229–235, 246, 337–338, 371–375, 378, 393, 396–400, 403–407, 427–429, 540, 603, 609, 613, 627, 631, 704, 722–723, 725, 730, 736, 741, 746, 782, 785, 791, 796, 798–806, 821, 826, 903, 907, 934
   tests.py76198%363
TOTAL253289664% 

Tests Skipped Failures Errors Time
249 0 💤 0 ❌ 0 🔥 3.975s ⏱️

Copy link

github-actions bot commented May 27, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/edtf
   __init__.py40100% 
   appsettings.py24483%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py922177%88, 93, 95, 98–99, 101–102, 104, 109, 113–116, 155, 157, 159, 169–170, 174–175, 183
   jdutil.py986632%37, 55, 91–92, 105, 152, 154–155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 251–252, 254–255, 257–258, 260, 262, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py71710%3–4, 6, 9–13, 16–21, 24–25, 28–29, 32–37, 40–44, 52–53, 56–62, 65–71, 74–79, 82–85, 88–91, 94–97, 100–107
/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1487152%34, 44–45, 47–50, 55–56, 59–62, 64, 68–71, 73–74, 76–78, 86–88, 90–94, 104, 106, 119, 126, 157–159, 161–166, 169–171, 173–178, 202–205, 209, 224, 226–227, 229, 246, 248, 256, 258, 260, 262, 267, 270, 276
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/edtf/parser
   __init__.py40100% 
   edtf_exceptions.py30100% 
   grammar.py123992%147–150, 346, 350–353
   parser_classes.py54827749%69, 71, 78–81, 83–84, 86–87, 110–112, 116, 119, 122, 181, 183, 190, 192, 198–202, 207–213, 220–224, 229–235, 246, 257, 286, 290, 302–304, 309, 317–319, 322, 337–338, 342, 371–375, 378, 383–384, 387, 390, 393, 396–400, 403–407, 427–429, 453, 457, 462, 464, 478, 485, 501, 510–512, 514–516, 519–520, 522, 525–528, 530, 532–534, 536, 540, 549–551, 555, 557, 560–562, 566, 568, 573–576, 581–582, 587–588, 590, 593, 596–598, 600, 603, 606–609, 611–617, 624–627, 629–635, 644–645, 648, 651, 654–656, 658, 666, 685–687, 689–692, 694–695, 697–698, 700, 703–704, 706–707, 709, 711, 713–714, 716, 718–723, 725, 727, 729–730, 732, 735–737, 740–742, 745–747, 755, 757–758, 761–762, 765–766, 769–770, 772–773, 777, 781–782, 785, 790–791, 795–796, 798–806, 808, 818–819, 821, 823–824, 826, 829, 834, 839, 845–846, 849, 852, 855, 857–859, 861, 866–867, 869, 878–879, 882, 885, 888–889, 891, 900–901, 903–905, 907, 916–918, 923, 926–927, 929, 934
   tests.py76760%3–4, 6, 8–10, 26, 219, 233, 255, 257–260, 262–264, 266–270, 273–274, 276–277, 280–282, 285–286, 289–292, 295, 298–302, 305, 308, 311, 314–319, 322, 325, 328, 333–334, 336–337, 340, 342–347, 349–356, 359–361, 363
edtf
   __init__.py40100% 
   appsettings.py24291%12–13
   convert.py631182%11–19, 21, 73
   fields.py92920%1, 3–6, 8–10, 12, 20, 26, 28, 30–32, 35–36, 48–49, 64, 66, 69, 71–74, 76–80, 82–83, 85, 87–88, 90, 92–93, 95, 97–99, 101–102, 104, 106–109, 111, 113–116, 118, 127–129, 132, 135, 141–142, 144–146, 149, 153, 155, 157, 159, 162–175, 181, 183–184, 186–187, 192–193
   jdutil.py984455%37, 55, 91–92, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py710100% 
edtf/natlang
   __init__.py20100% 
   en.py1481192%56, 59, 119, 165–166, 177–178, 204–205, 209, 276
   tests.py10190%211
edtf/parser
   __init__.py40100% 
   edtf_exceptions.py30100% 
   grammar.py123199%352
   parser_classes.py5488484%110–112, 119, 122, 183, 189–193, 200–202, 209–213, 222–224, 229–235, 246, 337–338, 371–375, 378, 393, 396–400, 403–407, 427–429, 540, 603, 609, 613, 627, 631, 704, 722–723, 725, 730, 736, 741, 746, 782, 785, 791, 796, 798–806, 821, 826, 903, 907, 934
   tests.py76198%363
TOTAL253289664% 

Tests Skipped Failures Errors Time
249 0 💤 0 ❌ 0 🔥 2.453s ⏱️

@aweakley aweakley marked this pull request as ready for review May 27, 2024 06:21
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 6c0e239 Previous: 90558b6 Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 70641.72248747271 iter/sec (stddev: 7.631740109706085e-7) 117838.09411600193 iter/sec (stddev: 9.140748993217583e-7) 1.67
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 8265.027515352316 iter/sec (stddev: 0.00000624553173262339) 11449.295346157909 iter/sec (stddev: 0.00000546797602185004) 1.39
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 9946.622189510234 iter/sec (stddev: 0.0000060038117620762754) 14018.980954980647 iter/sec (stddev: 0.000004190733350336885) 1.41
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 6767.269493555209 iter/sec (stddev: 0.000006786669661079336) 9377.335229826682 iter/sec (stddev: 0.000005341933165905862) 1.39
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 11463.57222196724 iter/sec (stddev: 0.000009888909809905773) 16635.89085978395 iter/sec (stddev: 0.000003722896762661871) 1.45
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 8494.477221134308 iter/sec (stddev: 0.000006319040682758152) 11799.981255815099 iter/sec (stddev: 0.000004886697630423069) 1.39
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 5693.466862411181 iter/sec (stddev: 0.0000074192037469237325) 7327.001686715526 iter/sec (stddev: 0.000014874586617515084) 1.29
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 7345.582820224108 iter/sec (stddev: 0.000007711477707651927) 10113.290756146082 iter/sec (stddev: 0.000004521646195592372) 1.38
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 49730.52522186321 iter/sec (stddev: 0.0000014177870959215635) 69415.36587515069 iter/sec (stddev: 0.000001258463340756581) 1.40
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 44622.733371628405 iter/sec (stddev: 0.0000013189163197732718) 57149.619901531514 iter/sec (stddev: 0.0000010163156920467694) 1.28
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 22585.42489715447 iter/sec (stddev: 0.00000290588232244421) 32295.71927034893 iter/sec (stddev: 0.000003964388925568352) 1.43
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 127.11360552437587 iter/sec (stddev: 0.0005263511089472479) 147.90762624443573 iter/sec (stddev: 0.000677037340647177) 1.16
edtf/parser/tests.py::test_benchmark_parser[2008-12] 134.09690138556914 iter/sec (stddev: 0.0015129888460220502) 154.10346486830713 iter/sec (stddev: 0.002119069171598076) 1.15
edtf/parser/tests.py::test_benchmark_parser[2008] 162.22746462824088 iter/sec (stddev: 0.0020802469862917193) 193.72321366345068 iter/sec (stddev: 0.0015694673864413153) 1.19
edtf/parser/tests.py::test_benchmark_parser[-0999] 168.8424534076089 iter/sec (stddev: 0.001335171793366204) 192.4055135031146 iter/sec (stddev: 0.0021115296335792004) 1.14
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 112.52475921460926 iter/sec (stddev: 0.0020055908064093406) 132.30107724950307 iter/sec (stddev: 0.0022513662265232224) 1.18
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 101.60889128215474 iter/sec (stddev: 0.0018984994313346053) 117.33029498812579 iter/sec (stddev: 0.0024572631034443) 1.15
edtf/parser/tests.py::test_benchmark_parser[/2006] 211.62459821791225 iter/sec (stddev: 0.0011246478706547632) 261.5659554104642 iter/sec (stddev: 0.00012280976585137294) 1.24
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 175.12035346040562 iter/sec (stddev: 0.00020742709140351162) 204.48382538973428 iter/sec (stddev: 0.0011968975778576395) 1.17
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 18.699448530262654 iter/sec (stddev: 0.0033446667504534455) 22.079815197887676 iter/sec (stddev: 0.0004880141774492468) 1.18
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 393.6419880843278 iter/sec (stddev: 0.00008406965657298834) 496.9792544677667 iter/sec (stddev: 0.00008549226261985391) 1.26
edtf/parser/tests.py::test_benchmark_parser[2001-29] 96.59289844583233 iter/sec (stddev: 0.001866637366794991) 112.09680919584098 iter/sec (stddev: 0.0022428458952360266) 1.16

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@ColeDCrawford ColeDCrawford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! That Action seemed fairly easy to integrate, as does pytest-benchmark. It seems like the natlang parser is very fast, with the EDTF parser running much slower. It was pretty obvious on some of those tests when you enabled packrat, nice performance bump there. Not sure what some of the other oscillations are - perhaps just variance in runs?

Comment on lines +359 to +363
@pytest.mark.benchmark
@pytest.mark.parametrize("test_input", BENCHMARK_EXAMPLES)
def test_benchmark_parser(benchmark, test_input):
"""Benchmark parsing of selected EDTF strings."""
benchmark(parse, test_input)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems very smooth to integrate this

@aweakley aweakley merged commit d550274 into v5 May 28, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants