mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Added size-sort options to scripts/code.py
Now with -s/--sort and -S/--reverse-sort for sorting the functions by size. You may wonder why add reverse-sort, since its utility doesn't seem worth the cost to implement (these are just helper scripts after all), the reason is that reverse-sort is quite useful on the command-line, where scrollback may be truncated, and you only care about the larger entries. Outside of the command-line, normal sort is prefered. Fortunately the difference is just the sign in the sort key. Note this conflicts with the short --summary flag, so that has been removed.
This commit is contained in:
		
							
								
								
									
										4
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							| @@ -229,7 +229,7 @@ jobs: | ||||
|                 | select(.context == env.CONTEXT).description | ||||
|                 | capture("Code size is (?<result>[0-9]+)").result' \ | ||||
|               || echo 0)" | ||||
|             export DESCRIPTION="$(./scripts/code.py -u $f -s | awk ' | ||||
|             export DESCRIPTION="$(./scripts/code.py -u $f --summary | awk ' | ||||
|               NR==2 {printf "Code size is %d B",$2} | ||||
|               NR==2 && ENVIRON["PREV"]+0 != 0 { | ||||
|                 printf " (%+.1f%%)",100*($2-ENVIRON["PREV"])/ENVIRON["PREV"]}')" | ||||
| @@ -427,7 +427,7 @@ jobs: | ||||
|               | capture("Coverage is (?<result>[0-9\\.]+)").result' \ | ||||
|             || echo 0)" | ||||
|           export DESCRIPTION="$( | ||||
|             ./scripts/coverage.py -u results/coverage.csv -s | awk -F '[ /%]+' ' | ||||
|             ./scripts/coverage.py -u results/coverage.csv --summary | awk -F '[ /%]+' ' | ||||
|               NR==2 {printf "Coverage is %.1f%% of %d lines",$4,$3} | ||||
|               NR==2 && ENVIRON["PREV"]+0 != 0 { | ||||
|                 printf " (%+.1f%%)",$4-ENVIRON["PREV"]}')" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user