greenmining 0.1.10__py3-none-any.whl → 0.1.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- greenmining/__init__.py +42 -1
- greenmining/cli.py +9 -3
- greenmining/controllers/repository_controller.py +10 -3
- greenmining/gsf_patterns.py +795 -2
- {greenmining-0.1.10.dist-info → greenmining-0.1.12.dist-info}/METADATA +174 -38
- {greenmining-0.1.10.dist-info → greenmining-0.1.12.dist-info}/RECORD +10 -10
- {greenmining-0.1.10.dist-info → greenmining-0.1.12.dist-info}/WHEEL +0 -0
- {greenmining-0.1.10.dist-info → greenmining-0.1.12.dist-info}/entry_points.txt +0 -0
- {greenmining-0.1.10.dist-info → greenmining-0.1.12.dist-info}/licenses/LICENSE +0 -0
- {greenmining-0.1.10.dist-info → greenmining-0.1.12.dist-info}/top_level.txt +0 -0
greenmining/gsf_patterns.py
CHANGED
|
@@ -554,9 +554,667 @@ GSF_PATTERNS = {
|
|
|
554
554
|
"description": "Process multiple items together instead of one at a time",
|
|
555
555
|
"sci_impact": "Reduces per-item overhead and improves throughput",
|
|
556
556
|
},
|
|
557
|
+
# ==================== RESOURCE OPTIMIZATION (Expanded from VU Amsterdam) ====================
|
|
558
|
+
"resource_limits": {
|
|
559
|
+
"name": "Resource Limits & Constraints",
|
|
560
|
+
"category": "resource",
|
|
561
|
+
"keywords": [
|
|
562
|
+
"limit",
|
|
563
|
+
"limits",
|
|
564
|
+
"constraint",
|
|
565
|
+
"constraints",
|
|
566
|
+
"quota",
|
|
567
|
+
"cap",
|
|
568
|
+
"memory limit",
|
|
569
|
+
"cpu limit",
|
|
570
|
+
"resource limit",
|
|
571
|
+
"timeout",
|
|
572
|
+
"max threads",
|
|
573
|
+
"thread limit",
|
|
574
|
+
],
|
|
575
|
+
"description": "Set hard limits on resource consumption to prevent waste",
|
|
576
|
+
"sci_impact": "Prevents resource exhaustion and runaway processes",
|
|
577
|
+
},
|
|
578
|
+
"dynamic_resource_allocation": {
|
|
579
|
+
"name": "Dynamic Resource Allocation",
|
|
580
|
+
"category": "resource",
|
|
581
|
+
"keywords": [
|
|
582
|
+
"dynamic allocation",
|
|
583
|
+
"vpa",
|
|
584
|
+
"vertical pod autoscaling",
|
|
585
|
+
"custom metric",
|
|
586
|
+
"scaling policy",
|
|
587
|
+
"predictive scaling",
|
|
588
|
+
],
|
|
589
|
+
"description": "Dynamically adjust resource allocation based on actual usage",
|
|
590
|
+
"sci_impact": "Eliminates over-provisioning and improves efficiency",
|
|
591
|
+
},
|
|
592
|
+
# ==================== CACHING & DATA EFFICIENCY (Expanded) ====================
|
|
593
|
+
"multi_level_caching": {
|
|
594
|
+
"name": "Multi-Level Caching",
|
|
595
|
+
"category": "caching",
|
|
596
|
+
"keywords": [
|
|
597
|
+
"multi level cache",
|
|
598
|
+
"l1 cache",
|
|
599
|
+
"l2 cache",
|
|
600
|
+
"cache layer",
|
|
601
|
+
"distributed cache",
|
|
602
|
+
"local cache",
|
|
603
|
+
"cache hierarchy",
|
|
604
|
+
],
|
|
605
|
+
"description": "Implement multiple caching levels for optimal efficiency",
|
|
606
|
+
"sci_impact": "Reduces redundant computation and network traffic",
|
|
607
|
+
},
|
|
608
|
+
"cache_invalidation": {
|
|
609
|
+
"name": "Cache Invalidation Strategy",
|
|
610
|
+
"category": "caching",
|
|
611
|
+
"keywords": [
|
|
612
|
+
"cache invalidation",
|
|
613
|
+
"cache invalidate",
|
|
614
|
+
"ttl",
|
|
615
|
+
"time to live",
|
|
616
|
+
"eviction",
|
|
617
|
+
"cache expir",
|
|
618
|
+
"cache refresh",
|
|
619
|
+
"stale while revalidate",
|
|
620
|
+
],
|
|
621
|
+
"description": "Implement efficient cache invalidation to balance freshness and efficiency",
|
|
622
|
+
"sci_impact": "Optimizes cache hit rates and reduces unnecessary refreshes",
|
|
623
|
+
},
|
|
624
|
+
"data_deduplication": {
|
|
625
|
+
"name": "Data Deduplication",
|
|
626
|
+
"category": "data",
|
|
627
|
+
"keywords": [
|
|
628
|
+
"deduplicate",
|
|
629
|
+
"deduplication",
|
|
630
|
+
"redundancy",
|
|
631
|
+
"duplicate",
|
|
632
|
+
"unique",
|
|
633
|
+
"eliminate redundant",
|
|
634
|
+
],
|
|
635
|
+
"description": "Eliminate redundant data storage and processing",
|
|
636
|
+
"sci_impact": "Reduces storage footprint and processing overhead",
|
|
637
|
+
},
|
|
638
|
+
"efficient_serialization": {
|
|
639
|
+
"name": "Efficient Serialization",
|
|
640
|
+
"category": "data",
|
|
641
|
+
"keywords": [
|
|
642
|
+
"protobuf",
|
|
643
|
+
"protocol buffer",
|
|
644
|
+
"avro",
|
|
645
|
+
"messagepack",
|
|
646
|
+
"serialization",
|
|
647
|
+
"binary format",
|
|
648
|
+
"efficient format",
|
|
649
|
+
],
|
|
650
|
+
"description": "Use efficient binary serialization formats",
|
|
651
|
+
"sci_impact": "Reduces network bandwidth and serialization overhead",
|
|
652
|
+
},
|
|
653
|
+
"pagination": {
|
|
654
|
+
"name": "Pagination & Lazy Loading",
|
|
655
|
+
"category": "data",
|
|
656
|
+
"keywords": [
|
|
657
|
+
"pagination",
|
|
658
|
+
"paginate",
|
|
659
|
+
"page size",
|
|
660
|
+
"limit offset",
|
|
661
|
+
"lazy load",
|
|
662
|
+
"on demand",
|
|
663
|
+
"defer load",
|
|
664
|
+
],
|
|
665
|
+
"description": "Load data incrementally instead of all at once",
|
|
666
|
+
"sci_impact": "Reduces memory usage and initial load time",
|
|
667
|
+
},
|
|
668
|
+
# ==================== EVENT-DRIVEN & ASYNCHRONOUS (Expanded) ====================
|
|
669
|
+
"event_driven_architecture": {
|
|
670
|
+
"name": "Event-Driven Architecture",
|
|
671
|
+
"category": "async",
|
|
672
|
+
"keywords": [
|
|
673
|
+
"event driven",
|
|
674
|
+
"event sourcing",
|
|
675
|
+
"event listener",
|
|
676
|
+
"kafka",
|
|
677
|
+
"rabbitmq",
|
|
678
|
+
"message broker",
|
|
679
|
+
"pub sub",
|
|
680
|
+
"publish subscribe",
|
|
681
|
+
"webhook",
|
|
682
|
+
],
|
|
683
|
+
"description": "Use events instead of polling to reduce unnecessary CPU cycles",
|
|
684
|
+
"sci_impact": "Eliminates wasteful polling and enables reactive processing",
|
|
685
|
+
},
|
|
686
|
+
"eliminate_polling": {
|
|
687
|
+
"name": "Eliminate Polling",
|
|
688
|
+
"category": "async",
|
|
689
|
+
"keywords": [
|
|
690
|
+
"poll",
|
|
691
|
+
"polling",
|
|
692
|
+
"reduce poll",
|
|
693
|
+
"stop poll",
|
|
694
|
+
"websocket",
|
|
695
|
+
"sse",
|
|
696
|
+
"server sent event",
|
|
697
|
+
"push notification",
|
|
698
|
+
],
|
|
699
|
+
"description": "Replace polling with push-based notifications",
|
|
700
|
+
"sci_impact": "Dramatically reduces unnecessary CPU and network usage",
|
|
701
|
+
},
|
|
702
|
+
"reactive_streams": {
|
|
703
|
+
"name": "Reactive Streams",
|
|
704
|
+
"category": "async",
|
|
705
|
+
"keywords": [
|
|
706
|
+
"reactive",
|
|
707
|
+
"reactor",
|
|
708
|
+
"rxjava",
|
|
709
|
+
"completablefuture",
|
|
710
|
+
"webflux",
|
|
711
|
+
"project reactor",
|
|
712
|
+
"coroutine",
|
|
713
|
+
"suspend",
|
|
714
|
+
],
|
|
715
|
+
"description": "Use reactive programming for non-blocking I/O",
|
|
716
|
+
"sci_impact": "Improves thread utilization and reduces blocking operations",
|
|
717
|
+
},
|
|
718
|
+
# ==================== DATABASE OPTIMIZATION (Expanded) ====================
|
|
719
|
+
"query_optimization": {
|
|
720
|
+
"name": "Query Optimization",
|
|
721
|
+
"category": "database",
|
|
722
|
+
"keywords": [
|
|
723
|
+
"query optim",
|
|
724
|
+
"explain plan",
|
|
725
|
+
"query plan",
|
|
726
|
+
"n+1",
|
|
727
|
+
"n plus 1",
|
|
728
|
+
"eager load",
|
|
729
|
+
"batch query",
|
|
730
|
+
"select star",
|
|
731
|
+
],
|
|
732
|
+
"description": "Optimize database queries to reduce CPU and I/O",
|
|
733
|
+
"sci_impact": "Reduces database server load and query execution time",
|
|
734
|
+
},
|
|
735
|
+
"prepared_statements": {
|
|
736
|
+
"name": "Prepared Statements",
|
|
737
|
+
"category": "database",
|
|
738
|
+
"keywords": [
|
|
739
|
+
"prepared statement",
|
|
740
|
+
"statement cache",
|
|
741
|
+
"statement pool",
|
|
742
|
+
"parameterized query",
|
|
743
|
+
"bind variable",
|
|
744
|
+
],
|
|
745
|
+
"description": "Use prepared statements for repeated queries",
|
|
746
|
+
"sci_impact": "Reduces query parsing overhead and improves security",
|
|
747
|
+
},
|
|
748
|
+
"database_views": {
|
|
749
|
+
"name": "Database Views & Materialized Views",
|
|
750
|
+
"category": "database",
|
|
751
|
+
"keywords": [
|
|
752
|
+
"database view",
|
|
753
|
+
"materialized view",
|
|
754
|
+
"view",
|
|
755
|
+
"precompute",
|
|
756
|
+
"aggregate table",
|
|
757
|
+
],
|
|
758
|
+
"description": "Use views to precompute complex queries",
|
|
759
|
+
"sci_impact": "Reduces redundant computation for common queries",
|
|
760
|
+
},
|
|
761
|
+
# ==================== ALGORITHM & CODE EFFICIENCY ====================
|
|
762
|
+
"algorithm_optimization": {
|
|
763
|
+
"name": "Algorithm Optimization",
|
|
764
|
+
"category": "code",
|
|
765
|
+
"keywords": [
|
|
766
|
+
"algorithm optim",
|
|
767
|
+
"complexity",
|
|
768
|
+
"big o",
|
|
769
|
+
"o(n)",
|
|
770
|
+
"memoiz",
|
|
771
|
+
"dynamic programming",
|
|
772
|
+
"efficient algorithm",
|
|
773
|
+
],
|
|
774
|
+
"description": "Use efficient algorithms to reduce CPU cycles",
|
|
775
|
+
"sci_impact": "Reduces computational overhead and execution time",
|
|
776
|
+
},
|
|
777
|
+
"code_efficiency": {
|
|
778
|
+
"name": "Code Efficiency & Lean Code",
|
|
779
|
+
"category": "code",
|
|
780
|
+
"keywords": [
|
|
781
|
+
"dead code",
|
|
782
|
+
"unused code",
|
|
783
|
+
"remove code",
|
|
784
|
+
"efficient code",
|
|
785
|
+
"lean code",
|
|
786
|
+
"minimize allocation",
|
|
787
|
+
"object pool",
|
|
788
|
+
],
|
|
789
|
+
"description": "Write efficient, minimal code that uses fewer resources",
|
|
790
|
+
"sci_impact": "Reduces memory pressure and garbage collection overhead",
|
|
791
|
+
},
|
|
792
|
+
"reduce_reflection": {
|
|
793
|
+
"name": "Reduce Reflection Usage",
|
|
794
|
+
"category": "code",
|
|
795
|
+
"keywords": [
|
|
796
|
+
"reflection",
|
|
797
|
+
"avoid reflection",
|
|
798
|
+
"introspection",
|
|
799
|
+
"dynamic lookup",
|
|
800
|
+
"hot path",
|
|
801
|
+
],
|
|
802
|
+
"description": "Avoid reflection in performance-critical code paths",
|
|
803
|
+
"sci_impact": "Reduces CPU overhead in frequently executed code",
|
|
804
|
+
},
|
|
805
|
+
"garbage_collection_tuning": {
|
|
806
|
+
"name": "Garbage Collection Tuning",
|
|
807
|
+
"category": "code",
|
|
808
|
+
"keywords": [
|
|
809
|
+
"garbage collection",
|
|
810
|
+
"gc tune",
|
|
811
|
+
"gc pause",
|
|
812
|
+
"gc optim",
|
|
813
|
+
"memory management",
|
|
814
|
+
"heap size",
|
|
815
|
+
],
|
|
816
|
+
"description": "Optimize garbage collection settings for efficiency",
|
|
817
|
+
"sci_impact": "Reduces GC overhead and improves application responsiveness",
|
|
818
|
+
},
|
|
819
|
+
# ==================== NETWORK OPTIMIZATION (Expanded) ====================
|
|
820
|
+
"grpc_optimization": {
|
|
821
|
+
"name": "gRPC for Service Communication",
|
|
822
|
+
"category": "network",
|
|
823
|
+
"keywords": [
|
|
824
|
+
"grpc",
|
|
825
|
+
"http2",
|
|
826
|
+
"h2",
|
|
827
|
+
"multiplexing",
|
|
828
|
+
"protocol buffer",
|
|
829
|
+
"efficient protocol",
|
|
830
|
+
],
|
|
831
|
+
"description": "Use gRPC instead of REST for high-traffic inter-service communication",
|
|
832
|
+
"sci_impact": "Reduces network overhead through binary protocols and multiplexing",
|
|
833
|
+
},
|
|
834
|
+
"request_batching": {
|
|
835
|
+
"name": "Request Batching & Aggregation",
|
|
836
|
+
"category": "network",
|
|
837
|
+
"keywords": [
|
|
838
|
+
"batch request",
|
|
839
|
+
"request batch",
|
|
840
|
+
"aggregate request",
|
|
841
|
+
"coalesce",
|
|
842
|
+
"reduce call",
|
|
843
|
+
"bulk request",
|
|
844
|
+
],
|
|
845
|
+
"description": "Aggregate multiple requests into batches",
|
|
846
|
+
"sci_impact": "Reduces network overhead and context switching",
|
|
847
|
+
},
|
|
848
|
+
"graphql_optimization": {
|
|
849
|
+
"name": "GraphQL for Selective Retrieval",
|
|
850
|
+
"category": "network",
|
|
851
|
+
"keywords": [
|
|
852
|
+
"graphql",
|
|
853
|
+
"selective field",
|
|
854
|
+
"field selection",
|
|
855
|
+
"overfetch",
|
|
856
|
+
"underfetch",
|
|
857
|
+
],
|
|
858
|
+
"description": "Use GraphQL to retrieve only required fields",
|
|
859
|
+
"sci_impact": "Eliminates over-fetching and reduces payload size",
|
|
860
|
+
},
|
|
861
|
+
"api_gateway": {
|
|
862
|
+
"name": "API Gateway Pattern",
|
|
863
|
+
"category": "network",
|
|
864
|
+
"keywords": [
|
|
865
|
+
"api gateway",
|
|
866
|
+
"gateway",
|
|
867
|
+
"aggregation gateway",
|
|
868
|
+
"bff",
|
|
869
|
+
"backend for frontend",
|
|
870
|
+
],
|
|
871
|
+
"description": "Use API gateway for request aggregation and routing",
|
|
872
|
+
"sci_impact": "Reduces client-server roundtrips and enables caching",
|
|
873
|
+
},
|
|
874
|
+
"circuit_breaker_advanced": {
|
|
875
|
+
"name": "Circuit Breaker & Bulkhead",
|
|
876
|
+
"category": "network",
|
|
877
|
+
"keywords": [
|
|
878
|
+
"circuit breaker",
|
|
879
|
+
"bulkhead",
|
|
880
|
+
"isolation",
|
|
881
|
+
"fault tolerance",
|
|
882
|
+
"retry backoff",
|
|
883
|
+
"exponential backoff",
|
|
884
|
+
],
|
|
885
|
+
"description": "Prevent cascading failures and isolate resources",
|
|
886
|
+
"sci_impact": "Avoids wasted energy on failing requests and protects resources",
|
|
887
|
+
},
|
|
888
|
+
"keep_alive_connections": {
|
|
889
|
+
"name": "Keep-Alive Connections",
|
|
890
|
+
"category": "network",
|
|
891
|
+
"keywords": [
|
|
892
|
+
"keep alive",
|
|
893
|
+
"persistent connection",
|
|
894
|
+
"connection reuse",
|
|
895
|
+
"http keep-alive",
|
|
896
|
+
"tcp keep-alive",
|
|
897
|
+
],
|
|
898
|
+
"description": "Maintain persistent connections to avoid handshake overhead",
|
|
899
|
+
"sci_impact": "Reduces TCP/TLS handshake energy consumption",
|
|
900
|
+
},
|
|
901
|
+
# ==================== MONITORING & OBSERVABILITY ====================
|
|
902
|
+
"energy_monitoring": {
|
|
903
|
+
"name": "Energy-Aware Monitoring",
|
|
904
|
+
"category": "monitoring",
|
|
905
|
+
"keywords": [
|
|
906
|
+
"rapl",
|
|
907
|
+
"power consumption",
|
|
908
|
+
"energy monitor",
|
|
909
|
+
"carbon footprint",
|
|
910
|
+
"energy metric",
|
|
911
|
+
"watt",
|
|
912
|
+
"power usage",
|
|
913
|
+
],
|
|
914
|
+
"description": "Monitor and measure energy consumption",
|
|
915
|
+
"sci_impact": "Enables identification of energy optimization opportunities",
|
|
916
|
+
},
|
|
917
|
+
"performance_profiling": {
|
|
918
|
+
"name": "Performance Profiling",
|
|
919
|
+
"category": "monitoring",
|
|
920
|
+
"keywords": [
|
|
921
|
+
"profil",
|
|
922
|
+
"flame graph",
|
|
923
|
+
"cpu profile",
|
|
924
|
+
"memory profile",
|
|
925
|
+
"perf",
|
|
926
|
+
"benchmark",
|
|
927
|
+
],
|
|
928
|
+
"description": "Profile application performance to identify bottlenecks",
|
|
929
|
+
"sci_impact": "Enables targeted optimization of resource-intensive operations",
|
|
930
|
+
},
|
|
931
|
+
"apm_monitoring": {
|
|
932
|
+
"name": "Application Performance Monitoring",
|
|
933
|
+
"category": "monitoring",
|
|
934
|
+
"keywords": [
|
|
935
|
+
"apm",
|
|
936
|
+
"application performance",
|
|
937
|
+
"latency tracking",
|
|
938
|
+
"throughput",
|
|
939
|
+
"response time",
|
|
940
|
+
"slow query",
|
|
941
|
+
],
|
|
942
|
+
"description": "Monitor application performance metrics",
|
|
943
|
+
"sci_impact": "Identifies performance degradation and optimization opportunities",
|
|
944
|
+
},
|
|
945
|
+
# ==================== AI/ML OPTIMIZATION (Expanded from VU Amsterdam) ====================
|
|
946
|
+
"model_pruning": {
|
|
947
|
+
"name": "Model Pruning",
|
|
948
|
+
"category": "ai",
|
|
949
|
+
"keywords": [
|
|
950
|
+
"prune",
|
|
951
|
+
"pruning",
|
|
952
|
+
"model prune",
|
|
953
|
+
"weight pruning",
|
|
954
|
+
"sparse model",
|
|
955
|
+
],
|
|
956
|
+
"description": "Remove unnecessary model weights to reduce size",
|
|
957
|
+
"sci_impact": "Reduces inference time and memory requirements",
|
|
958
|
+
},
|
|
959
|
+
"model_quantization": {
|
|
960
|
+
"name": "Model Quantization",
|
|
961
|
+
"category": "ai",
|
|
962
|
+
"keywords": [
|
|
963
|
+
"quantiz",
|
|
964
|
+
"quantization",
|
|
965
|
+
"int8",
|
|
966
|
+
"fp16",
|
|
967
|
+
"mixed precision",
|
|
968
|
+
"lower precision",
|
|
969
|
+
],
|
|
970
|
+
"description": "Reduce model precision to improve efficiency",
|
|
971
|
+
"sci_impact": "Dramatically reduces memory and compute requirements",
|
|
972
|
+
},
|
|
973
|
+
"knowledge_distillation": {
|
|
974
|
+
"name": "Knowledge Distillation",
|
|
975
|
+
"category": "ai",
|
|
976
|
+
"keywords": [
|
|
977
|
+
"distill",
|
|
978
|
+
"distillation",
|
|
979
|
+
"knowledge distill",
|
|
980
|
+
"teacher student",
|
|
981
|
+
"model compress",
|
|
982
|
+
],
|
|
983
|
+
"description": "Compress large models into smaller ones",
|
|
984
|
+
"sci_impact": "Maintains accuracy while reducing model size and energy",
|
|
985
|
+
},
|
|
986
|
+
"early_stopping": {
|
|
987
|
+
"name": "Early Stopping",
|
|
988
|
+
"category": "ai",
|
|
989
|
+
"keywords": [
|
|
990
|
+
"early stop",
|
|
991
|
+
"early stopping",
|
|
992
|
+
"stop training",
|
|
993
|
+
"convergence",
|
|
994
|
+
"plateau",
|
|
995
|
+
],
|
|
996
|
+
"description": "Stop training when model performance plateaus",
|
|
997
|
+
"sci_impact": "Prevents wasted training energy after convergence",
|
|
998
|
+
},
|
|
999
|
+
"efficient_ml_framework": {
|
|
1000
|
+
"name": "Efficient ML Framework",
|
|
1001
|
+
"category": "ai",
|
|
1002
|
+
"keywords": [
|
|
1003
|
+
"tensorflow lite",
|
|
1004
|
+
"onnx",
|
|
1005
|
+
"onnx runtime",
|
|
1006
|
+
"tflite",
|
|
1007
|
+
"efficient framework",
|
|
1008
|
+
"optimized runtime",
|
|
1009
|
+
],
|
|
1010
|
+
"description": "Use ML frameworks optimized for efficiency",
|
|
1011
|
+
"sci_impact": "Reduces inference overhead and energy consumption",
|
|
1012
|
+
},
|
|
1013
|
+
"edge_inference": {
|
|
1014
|
+
"name": "Edge Inference",
|
|
1015
|
+
"category": "ai",
|
|
1016
|
+
"keywords": [
|
|
1017
|
+
"edge inference",
|
|
1018
|
+
"edge computing",
|
|
1019
|
+
"edge ai",
|
|
1020
|
+
"on device",
|
|
1021
|
+
"local inference",
|
|
1022
|
+
],
|
|
1023
|
+
"description": "Run inference on edge devices to reduce network transfers",
|
|
1024
|
+
"sci_impact": "Eliminates cloud round-trip and reduces data center load",
|
|
1025
|
+
},
|
|
1026
|
+
"batch_inference_optimization": {
|
|
1027
|
+
"name": "Batch Inference Optimization",
|
|
1028
|
+
"category": "ai",
|
|
1029
|
+
"keywords": [
|
|
1030
|
+
"batch inference",
|
|
1031
|
+
"batch predict",
|
|
1032
|
+
"inference batch",
|
|
1033
|
+
"batch size",
|
|
1034
|
+
"throughput optim",
|
|
1035
|
+
],
|
|
1036
|
+
"description": "Optimize batch size for efficient inference",
|
|
1037
|
+
"sci_impact": "Maximizes GPU utilization and throughput",
|
|
1038
|
+
},
|
|
1039
|
+
"model_caching": {
|
|
1040
|
+
"name": "Model Prediction Caching",
|
|
1041
|
+
"category": "ai",
|
|
1042
|
+
"keywords": [
|
|
1043
|
+
"prediction cache",
|
|
1044
|
+
"inference cache",
|
|
1045
|
+
"model cache",
|
|
1046
|
+
"cache prediction",
|
|
1047
|
+
],
|
|
1048
|
+
"description": "Cache predictions for repeated inputs",
|
|
1049
|
+
"sci_impact": "Avoids redundant inference computations",
|
|
1050
|
+
},
|
|
1051
|
+
# ==================== MICROSERVICES-SPECIFIC PATTERNS ====================
|
|
1052
|
+
"service_decomposition": {
|
|
1053
|
+
"name": "Service Decomposition & Right-Sizing",
|
|
1054
|
+
"category": "microservices",
|
|
1055
|
+
"keywords": [
|
|
1056
|
+
"service decomp",
|
|
1057
|
+
"decomposition",
|
|
1058
|
+
"right size service",
|
|
1059
|
+
"service boundary",
|
|
1060
|
+
"ddd",
|
|
1061
|
+
"domain driven",
|
|
1062
|
+
],
|
|
1063
|
+
"description": "Decompose services appropriately to minimize overhead",
|
|
1064
|
+
"sci_impact": "Reduces inter-service communication overhead",
|
|
1065
|
+
},
|
|
1066
|
+
"service_colocation": {
|
|
1067
|
+
"name": "Service Co-location",
|
|
1068
|
+
"category": "microservices",
|
|
1069
|
+
"keywords": [
|
|
1070
|
+
"co-location",
|
|
1071
|
+
"colocation",
|
|
1072
|
+
"colocate",
|
|
1073
|
+
"data locality",
|
|
1074
|
+
"same host",
|
|
1075
|
+
"affinity",
|
|
1076
|
+
],
|
|
1077
|
+
"description": "Co-locate related services to reduce network hops",
|
|
1078
|
+
"sci_impact": "Minimizes network latency and energy consumption",
|
|
1079
|
+
},
|
|
1080
|
+
"graceful_shutdown": {
|
|
1081
|
+
"name": "Graceful Shutdown",
|
|
1082
|
+
"category": "microservices",
|
|
1083
|
+
"keywords": [
|
|
1084
|
+
"graceful shutdown",
|
|
1085
|
+
"drain connection",
|
|
1086
|
+
"shutdown hook",
|
|
1087
|
+
"termination handler",
|
|
1088
|
+
"sigterm",
|
|
1089
|
+
],
|
|
1090
|
+
"description": "Implement graceful service shutdown procedures",
|
|
1091
|
+
"sci_impact": "Prevents wasted work and enables efficient decommissioning",
|
|
1092
|
+
},
|
|
1093
|
+
"service_mesh_optimization": {
|
|
1094
|
+
"name": "Service Mesh Optimization",
|
|
1095
|
+
"category": "microservices",
|
|
1096
|
+
"keywords": [
|
|
1097
|
+
"service mesh",
|
|
1098
|
+
"istio",
|
|
1099
|
+
"linkerd",
|
|
1100
|
+
"envoy proxy",
|
|
1101
|
+
"sidecar",
|
|
1102
|
+
"mesh config",
|
|
1103
|
+
],
|
|
1104
|
+
"description": "Optimize service mesh configuration for efficiency",
|
|
1105
|
+
"sci_impact": "Reduces proxy overhead and improves observability efficiency",
|
|
1106
|
+
},
|
|
1107
|
+
# ==================== INFRASTRUCTURE PATTERNS ====================
|
|
1108
|
+
"alpine_containers": {
|
|
1109
|
+
"name": "Minimal Container Images",
|
|
1110
|
+
"category": "infrastructure",
|
|
1111
|
+
"keywords": [
|
|
1112
|
+
"alpine",
|
|
1113
|
+
"lightweight image",
|
|
1114
|
+
"minimal image",
|
|
1115
|
+
"distroless",
|
|
1116
|
+
"slim image",
|
|
1117
|
+
"reduce image size",
|
|
1118
|
+
],
|
|
1119
|
+
"description": "Use minimal base images for containers",
|
|
1120
|
+
"sci_impact": "Reduces storage, network transfer, and attack surface",
|
|
1121
|
+
},
|
|
1122
|
+
"infrastructure_as_code": {
|
|
1123
|
+
"name": "Infrastructure as Code Optimization",
|
|
1124
|
+
"category": "infrastructure",
|
|
1125
|
+
"keywords": [
|
|
1126
|
+
"terraform",
|
|
1127
|
+
"cloudformation",
|
|
1128
|
+
"infrastructure code",
|
|
1129
|
+
"iac",
|
|
1130
|
+
"infra automation",
|
|
1131
|
+
],
|
|
1132
|
+
"description": "Automate infrastructure management for consistency",
|
|
1133
|
+
"sci_impact": "Enables consistent resource optimization and right-sizing",
|
|
1134
|
+
},
|
|
1135
|
+
"renewable_energy_regions": {
|
|
1136
|
+
"name": "Renewable Energy Regions",
|
|
1137
|
+
"category": "infrastructure",
|
|
1138
|
+
"keywords": [
|
|
1139
|
+
"renewable energy",
|
|
1140
|
+
"green region",
|
|
1141
|
+
"sustainable region",
|
|
1142
|
+
"clean energy",
|
|
1143
|
+
"carbon aware",
|
|
1144
|
+
],
|
|
1145
|
+
"description": "Deploy in regions with renewable energy",
|
|
1146
|
+
"sci_impact": "Reduces carbon intensity of operations",
|
|
1147
|
+
},
|
|
1148
|
+
"pod_disruption_budget": {
|
|
1149
|
+
"name": "Pod Disruption Budget",
|
|
1150
|
+
"category": "infrastructure",
|
|
1151
|
+
"keywords": [
|
|
1152
|
+
"pod disruption",
|
|
1153
|
+
"pdb",
|
|
1154
|
+
"disruption budget",
|
|
1155
|
+
"availability",
|
|
1156
|
+
"maintenance",
|
|
1157
|
+
],
|
|
1158
|
+
"description": "Configure pod disruption budgets for efficient updates",
|
|
1159
|
+
"sci_impact": "Enables efficient rolling updates without over-provisioning",
|
|
1160
|
+
},
|
|
1161
|
+
# ==================== GENERAL OPTIMIZATION PATTERNS ====================
|
|
1162
|
+
"feature_flags": {
|
|
1163
|
+
"name": "Feature Flags for Resource Control",
|
|
1164
|
+
"category": "general",
|
|
1165
|
+
"keywords": [
|
|
1166
|
+
"feature flag",
|
|
1167
|
+
"feature toggle",
|
|
1168
|
+
"flag",
|
|
1169
|
+
"toggle",
|
|
1170
|
+
"conditional feature",
|
|
1171
|
+
],
|
|
1172
|
+
"description": "Use feature flags to control expensive features",
|
|
1173
|
+
"sci_impact": "Enables selective activation of resource-intensive features",
|
|
1174
|
+
},
|
|
1175
|
+
"incremental_processing": {
|
|
1176
|
+
"name": "Incremental Processing",
|
|
1177
|
+
"category": "general",
|
|
1178
|
+
"keywords": [
|
|
1179
|
+
"incremental",
|
|
1180
|
+
"delta",
|
|
1181
|
+
"diff",
|
|
1182
|
+
"change data capture",
|
|
1183
|
+
"cdc",
|
|
1184
|
+
"streaming",
|
|
1185
|
+
],
|
|
1186
|
+
"description": "Process only changed data instead of full datasets",
|
|
1187
|
+
"sci_impact": "Dramatically reduces processing overhead for large datasets",
|
|
1188
|
+
},
|
|
1189
|
+
"precomputation": {
|
|
1190
|
+
"name": "Precomputation & Pre-aggregation",
|
|
1191
|
+
"category": "general",
|
|
1192
|
+
"keywords": [
|
|
1193
|
+
"precompute",
|
|
1194
|
+
"pre-aggregate",
|
|
1195
|
+
"preaggregate",
|
|
1196
|
+
"compute once",
|
|
1197
|
+
"precalculate",
|
|
1198
|
+
],
|
|
1199
|
+
"description": "Precompute expensive operations ahead of time",
|
|
1200
|
+
"sci_impact": "Avoids redundant computation at query time",
|
|
1201
|
+
},
|
|
1202
|
+
"approximation_algorithms": {
|
|
1203
|
+
"name": "Approximation Algorithms",
|
|
1204
|
+
"category": "general",
|
|
1205
|
+
"keywords": [
|
|
1206
|
+
"approximate",
|
|
1207
|
+
"approximation",
|
|
1208
|
+
"heuristic",
|
|
1209
|
+
"estimation",
|
|
1210
|
+
"sampling",
|
|
1211
|
+
],
|
|
1212
|
+
"description": "Use approximation for non-critical calculations",
|
|
1213
|
+
"sci_impact": "Reduces computational complexity with acceptable accuracy",
|
|
1214
|
+
},
|
|
557
1215
|
}
|
|
558
1216
|
|
|
559
|
-
# Green software keywords (comprehensive list from all GSF patterns)
|
|
1217
|
+
# Green software keywords (comprehensive list from all GSF patterns + VU Amsterdam research)
|
|
560
1218
|
GREEN_KEYWORDS = [
|
|
561
1219
|
# Core sustainability terms
|
|
562
1220
|
"energy",
|
|
@@ -572,6 +1230,7 @@ GREEN_KEYWORDS = [
|
|
|
572
1230
|
"eco",
|
|
573
1231
|
"environment",
|
|
574
1232
|
"renewable",
|
|
1233
|
+
"clean energy",
|
|
575
1234
|
# Performance & optimization
|
|
576
1235
|
"optimize",
|
|
577
1236
|
"optimization",
|
|
@@ -586,6 +1245,10 @@ GREEN_KEYWORDS = [
|
|
|
586
1245
|
"latency",
|
|
587
1246
|
"throughput",
|
|
588
1247
|
"utilization",
|
|
1248
|
+
"improve",
|
|
1249
|
+
"improvement",
|
|
1250
|
+
"enhance",
|
|
1251
|
+
"enhancement",
|
|
589
1252
|
# Caching & storage
|
|
590
1253
|
"cache",
|
|
591
1254
|
"caching",
|
|
@@ -601,10 +1264,17 @@ GREEN_KEYWORDS = [
|
|
|
601
1264
|
"gzip",
|
|
602
1265
|
"brotli",
|
|
603
1266
|
"zstd",
|
|
1267
|
+
"deflate",
|
|
604
1268
|
"deduplicate",
|
|
1269
|
+
"deduplication",
|
|
605
1270
|
"dedup",
|
|
606
1271
|
"archive",
|
|
607
1272
|
"retention",
|
|
1273
|
+
"ttl",
|
|
1274
|
+
"time to live",
|
|
1275
|
+
"eviction",
|
|
1276
|
+
"invalidation",
|
|
1277
|
+
"invalidate",
|
|
608
1278
|
# Resource management
|
|
609
1279
|
"pool",
|
|
610
1280
|
"pooling",
|
|
@@ -612,12 +1282,20 @@ GREEN_KEYWORDS = [
|
|
|
612
1282
|
"thread pool",
|
|
613
1283
|
"worker pool",
|
|
614
1284
|
"resource pool",
|
|
1285
|
+
"object pool",
|
|
615
1286
|
"reuse",
|
|
616
1287
|
"recycle",
|
|
617
1288
|
"cleanup",
|
|
618
1289
|
"garbage",
|
|
619
1290
|
"remove unused",
|
|
620
1291
|
"delete unused",
|
|
1292
|
+
"limit",
|
|
1293
|
+
"limits",
|
|
1294
|
+
"constraint",
|
|
1295
|
+
"quota",
|
|
1296
|
+
"cap",
|
|
1297
|
+
"timeout",
|
|
1298
|
+
"idle",
|
|
621
1299
|
# Async & concurrency
|
|
622
1300
|
"async",
|
|
623
1301
|
"asynchronous",
|
|
@@ -630,6 +1308,13 @@ GREEN_KEYWORDS = [
|
|
|
630
1308
|
"job",
|
|
631
1309
|
"batch",
|
|
632
1310
|
"batching",
|
|
1311
|
+
"concurrent",
|
|
1312
|
+
"parallel",
|
|
1313
|
+
"reactive",
|
|
1314
|
+
"event-driven",
|
|
1315
|
+
"event driven",
|
|
1316
|
+
"webhook",
|
|
1317
|
+
"callback",
|
|
633
1318
|
# Scaling & sizing
|
|
634
1319
|
"scale",
|
|
635
1320
|
"scaling",
|
|
@@ -641,12 +1326,16 @@ GREEN_KEYWORDS = [
|
|
|
641
1326
|
"vertical",
|
|
642
1327
|
"right-size",
|
|
643
1328
|
"rightsize",
|
|
1329
|
+
"right size",
|
|
644
1330
|
"downsize",
|
|
645
1331
|
"upsize",
|
|
646
1332
|
"hpa",
|
|
1333
|
+
"vpa",
|
|
647
1334
|
"keda",
|
|
648
1335
|
"demand",
|
|
649
1336
|
"load",
|
|
1337
|
+
"replica",
|
|
1338
|
+
"replicas",
|
|
650
1339
|
# Cloud native
|
|
651
1340
|
"serverless",
|
|
652
1341
|
"lambda",
|
|
@@ -661,7 +1350,9 @@ GREEN_KEYWORDS = [
|
|
|
661
1350
|
"microservice",
|
|
662
1351
|
"service mesh",
|
|
663
1352
|
"istio",
|
|
1353
|
+
"linkerd",
|
|
664
1354
|
"envoy",
|
|
1355
|
+
"sidecar",
|
|
665
1356
|
# Network optimization
|
|
666
1357
|
"network",
|
|
667
1358
|
"bandwidth",
|
|
@@ -677,9 +1368,19 @@ GREEN_KEYWORDS = [
|
|
|
677
1368
|
"throttle",
|
|
678
1369
|
"backpressure",
|
|
679
1370
|
"circuit breaker",
|
|
1371
|
+
"bulkhead",
|
|
680
1372
|
"shed",
|
|
681
1373
|
"reduce request",
|
|
682
1374
|
"minimize request",
|
|
1375
|
+
"http2",
|
|
1376
|
+
"h2",
|
|
1377
|
+
"grpc",
|
|
1378
|
+
"protobuf",
|
|
1379
|
+
"protocol buffer",
|
|
1380
|
+
"multiplexing",
|
|
1381
|
+
"keep-alive",
|
|
1382
|
+
"keep alive",
|
|
1383
|
+
"persistent connection",
|
|
683
1384
|
# Data & database
|
|
684
1385
|
"index",
|
|
685
1386
|
"indexing",
|
|
@@ -687,11 +1388,20 @@ GREEN_KEYWORDS = [
|
|
|
687
1388
|
"optimize query",
|
|
688
1389
|
"query optimization",
|
|
689
1390
|
"partition",
|
|
1391
|
+
"partitioning",
|
|
690
1392
|
"shard",
|
|
1393
|
+
"sharding",
|
|
691
1394
|
"database",
|
|
692
1395
|
"db",
|
|
693
1396
|
"sql",
|
|
694
1397
|
"nosql",
|
|
1398
|
+
"n+1",
|
|
1399
|
+
"n plus 1",
|
|
1400
|
+
"eager load",
|
|
1401
|
+
"prepared statement",
|
|
1402
|
+
"materialized view",
|
|
1403
|
+
"explain",
|
|
1404
|
+
"slow query",
|
|
695
1405
|
# Web optimization
|
|
696
1406
|
"minify",
|
|
697
1407
|
"minification",
|
|
@@ -710,9 +1420,12 @@ GREEN_KEYWORDS = [
|
|
|
710
1420
|
"avif",
|
|
711
1421
|
"image",
|
|
712
1422
|
"responsive",
|
|
1423
|
+
"pagination",
|
|
1424
|
+
"paginate",
|
|
713
1425
|
# AI/ML
|
|
714
1426
|
"model",
|
|
715
1427
|
"quantiz",
|
|
1428
|
+
"quantization",
|
|
716
1429
|
"prune",
|
|
717
1430
|
"pruning",
|
|
718
1431
|
"distill",
|
|
@@ -720,12 +1433,21 @@ GREEN_KEYWORDS = [
|
|
|
720
1433
|
"inference",
|
|
721
1434
|
"training",
|
|
722
1435
|
"pretrain",
|
|
1436
|
+
"pre-trained",
|
|
723
1437
|
"transfer learning",
|
|
724
1438
|
"gpu",
|
|
725
1439
|
"tpu",
|
|
726
1440
|
"accelerator",
|
|
727
1441
|
"mobilenet",
|
|
728
1442
|
"efficientnet",
|
|
1443
|
+
"edge ai",
|
|
1444
|
+
"tflite",
|
|
1445
|
+
"tensorflow lite",
|
|
1446
|
+
"onnx",
|
|
1447
|
+
"fp16",
|
|
1448
|
+
"int8",
|
|
1449
|
+
"mixed precision",
|
|
1450
|
+
"early stop",
|
|
729
1451
|
# Code & architecture
|
|
730
1452
|
"stateless",
|
|
731
1453
|
"decouple",
|
|
@@ -739,6 +1461,15 @@ GREEN_KEYWORDS = [
|
|
|
739
1461
|
"dead code",
|
|
740
1462
|
"unused",
|
|
741
1463
|
"deprecate",
|
|
1464
|
+
"algorithm",
|
|
1465
|
+
"complexity",
|
|
1466
|
+
"big o",
|
|
1467
|
+
"memoize",
|
|
1468
|
+
"memoization",
|
|
1469
|
+
"reflection",
|
|
1470
|
+
"garbage collection",
|
|
1471
|
+
"gc",
|
|
1472
|
+
"memory leak",
|
|
742
1473
|
# Security (energy-related)
|
|
743
1474
|
"ddos",
|
|
744
1475
|
"vulnerability",
|
|
@@ -750,7 +1481,17 @@ GREEN_KEYWORDS = [
|
|
|
750
1481
|
"sla",
|
|
751
1482
|
"metric",
|
|
752
1483
|
"monitor",
|
|
1484
|
+
"monitoring",
|
|
753
1485
|
"observability",
|
|
1486
|
+
"observ",
|
|
1487
|
+
"telemetry",
|
|
1488
|
+
"apm",
|
|
1489
|
+
"profiling",
|
|
1490
|
+
"profile",
|
|
1491
|
+
"flame graph",
|
|
1492
|
+
"benchmark",
|
|
1493
|
+
"rapl",
|
|
1494
|
+
"watt",
|
|
754
1495
|
# Specific technologies
|
|
755
1496
|
"redis",
|
|
756
1497
|
"memcached",
|
|
@@ -763,6 +1504,58 @@ GREEN_KEYWORDS = [
|
|
|
763
1504
|
"graviton",
|
|
764
1505
|
"arm",
|
|
765
1506
|
"architecture",
|
|
1507
|
+
"kafka",
|
|
1508
|
+
"rabbitmq",
|
|
1509
|
+
"message broker",
|
|
1510
|
+
"pub/sub",
|
|
1511
|
+
"publish",
|
|
1512
|
+
"subscribe",
|
|
1513
|
+
# Microservices specific
|
|
1514
|
+
"service",
|
|
1515
|
+
"decomposition",
|
|
1516
|
+
"boundary",
|
|
1517
|
+
"colocation",
|
|
1518
|
+
"co-location",
|
|
1519
|
+
"locality",
|
|
1520
|
+
"graceful shutdown",
|
|
1521
|
+
"drain",
|
|
1522
|
+
"api gateway",
|
|
1523
|
+
"graphql",
|
|
1524
|
+
"bff",
|
|
1525
|
+
# Infrastructure
|
|
1526
|
+
"alpine",
|
|
1527
|
+
"distroless",
|
|
1528
|
+
"lightweight",
|
|
1529
|
+
"minimal",
|
|
1530
|
+
"terraform",
|
|
1531
|
+
"cloudformation",
|
|
1532
|
+
"iac",
|
|
1533
|
+
"infrastructure as code",
|
|
1534
|
+
"pdb",
|
|
1535
|
+
"disruption budget",
|
|
1536
|
+
# General optimization
|
|
1537
|
+
"feature flag",
|
|
1538
|
+
"toggle",
|
|
1539
|
+
"incremental",
|
|
1540
|
+
"delta",
|
|
1541
|
+
"streaming",
|
|
1542
|
+
"precompute",
|
|
1543
|
+
"pre-aggregate",
|
|
1544
|
+
"approximate",
|
|
1545
|
+
"approximation",
|
|
1546
|
+
"heuristic",
|
|
1547
|
+
"sampling",
|
|
1548
|
+
# Additional VU Amsterdam terms
|
|
1549
|
+
"dvfs",
|
|
1550
|
+
"frequency scaling",
|
|
1551
|
+
"power state",
|
|
1552
|
+
"dynamic allocation",
|
|
1553
|
+
"adaptive",
|
|
1554
|
+
"predictive",
|
|
1555
|
+
"forecasting",
|
|
1556
|
+
"workload",
|
|
1557
|
+
"overhead",
|
|
1558
|
+
"footprint",
|
|
766
1559
|
]
|
|
767
1560
|
|
|
768
1561
|
|
|
@@ -796,7 +1589,7 @@ def is_green_aware(commit_message: str) -> bool:
|
|
|
796
1589
|
commit_message: The commit message to analyze
|
|
797
1590
|
|
|
798
1591
|
Returns:
|
|
799
|
-
True if commit
|
|
1592
|
+
True if commit has green keywords
|
|
800
1593
|
"""
|
|
801
1594
|
message_lower = commit_message.lower()
|
|
802
1595
|
return any(keyword.lower() in message_lower for keyword in GREEN_KEYWORDS)
|