Просмотр исходного кода

Added a CSV showing the evolution of the size of the sample programs

Benoit Blanchon 7 лет назад
Родитель
Сommit
399ccec645

+ 22 - 0
scripts/code-size/arduino_avr_uno.csv

@@ -0,0 +1,22 @@
+Version,Date,JsonParserExample,JsonGeneratorExample
+v6.6.0-beta-2-g2bd280d,2018-11-16,7872,8446
+v6.6.0-beta,2018-11-13,8380,8916
+v6.5.0-beta,2018-10-13,7384,7874
+v6.4.0-beta,2018-09-11,6940,7996
+v6.3.0-beta,2018-08-31,6778,7502
+v6.2.3-beta,2018-07-19,7108,7664
+v6.2.2-beta,2018-07-18,7108,7664
+v6.2.1-beta,2018-07-17,7108,7664
+v6.2.0-beta,2018-07-12,7108,7664
+v6.1.0-beta,2018-07-02,6536,7412
+v6.0.1-beta,2018-06-11,6358,7188
+v6.0.0-beta,2018-06-07,6358,7188
+v5.13.1,2018-02-19,6032,7088
+v5.13.0,2018-01-19,6026,7088
+v5.12.0,2017-12-11,6026,7088
+v5.11.2,2017-10-17,6026,7088
+v5.11.1,2017-07-14,6026,6984
+v5.11.0,2017-06-25,6216,7504
+v5.10.1,2017-06-12,6216,7504
+v5.10.0,2017-05-20,6224,7568
+v5.9.0,2017-04-24,6224,6958

+ 30 - 0
scripts/code-size/create-size-graph.sh

@@ -0,0 +1,30 @@
+#!/bin/bash
+
+set -eu
+
+PATH="$PATH:/c/Program Files (x86)/Arduino/"
+OUTPUT="$(pwd)/sizes.csv"
+BOARD="arduino:avr:uno"
+
+compile() {(
+  cd "$(dirname "$1")"
+  arduino --verify --board $BOARD "$(basename "$1")" 2>/dev/null | grep -e 'Sketch uses' | sed -E 's/.*uses ([0-9]*),?([0-9]+).*/\1\2/'
+)}
+
+cd "$(dirname $0)/../.."
+
+measure_version () {
+  VERSION=$(git describe)
+  DATE=$(git log -1 --date=short --pretty=format:%cd)
+  PARSER_SIZE=$(compile examples/JsonParserExample/JsonParserExample.ino)
+  GENERATOR_SIZE=$(compile examples/JsonGeneratorExample/JsonGeneratorExample.ino)
+
+  echo "$VERSION,$DATE,$PARSER_SIZE,$GENERATOR_SIZE" | tee -a "$OUTPUT"
+}
+
+echo "Commit,Date,JsonParserExample,JsonGeneratorExample" | tee "$OUTPUT"
+measure_version
+while git checkout -q HEAD~1
+do
+	measure_version
+done

+ 0 - 42
scripts/create-size-graph.sh

@@ -1,42 +0,0 @@
-#!/bin/bash
-
-set -eu
-
-OUTPUT="$(pwd)/sizes.csv"
-
-echo "Tag;Date;Parser;Generator" > $OUTPUT
-
-cd $(dirname $(dirname $0))
-
-git tag | while read TAG
-do 
-
-	git checkout -q tags/$TAG
-
-	DATE=$(git log -1 --date=short --pretty=format:%cd)
-	PARSER_SIZE=$(arduino --verify examples/JsonParserExample/JsonParserExample.ino 2>/dev/null  | grep -e 'Sketch uses' | sed 's/.*uses \([0-9]*\).\([0-9]\+\).*/\1\2/')
-	
-	if [ -e 'examples/JsonGeneratorExample/JsonGeneratorExample.ino' ]; then
-		GENERATOR_SIZE=$(arduino --verify examples/JsonGeneratorExample/JsonGeneratorExample.ino 2>/dev/null  | grep -e 'Sketch uses' | sed 's/.*uses \([0-9]*\).\([0-9]\+\).*/\1\2/')
-	else
-		GENERATOR_SIZE=""
-	fi
-
-	echo $TAG 
-	if [ ! -z "$PARSER_SIZE" ]
-	then
-		echo "JsonParserExample = $PARSER_SIZE bytes"
-	else
-		echo "JsonParserExample compilation failed."
-	fi
-
-	if [ ! -z "$GENERATOR_SIZE" ]
-	then
-		echo "JsonGeneratorExample = $GENERATOR_SIZE bytes"
-	else
-		echo "JsonGeneratorExample compilation failed."
-	fi
-
-	echo "$TAG;$DATE;$PARSER_SIZE;$GENERATOR_SIZE" >> $OUTPUT
-
-done