Skip to content

Commit

Permalink
Allow benchmark to work for V4.10
Browse files Browse the repository at this point in the history
Requires values for WEEWX_ROOT and SQLITE_ROOT
  • Loading branch information
tkeffer committed Dec 27, 2023
1 parent 966b3d8 commit ade633a
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 47 deletions.
36 changes: 21 additions & 15 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,43 @@
## Benchmark protocol

This is a benchmark designed to test how fast WeeWX generates the files and
images of the Seasons skin, using one year of data. Add your results to the
table at the end.
images of the Seasons skin, using one year of data.

1. Make sure you have installed WeeWX V5.0.0b13 or later. _Earlier versions will
not work!_

2. Download and unpack the test station data
1. Download and unpack the benchmark:

```shell
cd /var/tmp
wget https://weewx.com/benchmarks/weewx-benchmark.tar.gz
tar xvf weewx-benchmark.tar.gz
wget -O weewx-benchmark-master.tar.gz https://github.com/weewx/weewx-benchmark/archive/master.tar.gz
tar xvf weewx-benchmark-master.tar.gz
```

3. The test is of how long it takes to create and populate the subdirectory
`weewx-benchmark/public_html`, so make sure it is _not_ present before
continuing.
2. This benchmark will work _as is_ for Version 5.0.0b13 or later. However, for earlier
versions you must make two modifications in the configuration file `weewx.conf`:

- Set `WEEWX_ROOT` to the location of the benchmark:

WEEWX_ROOT=/var/tmp/weewx-benchmark-master

- Set `SQLITE_ROOT` to the location of the archive directory:

SQLITE_ROOT=/var/tmp/weewx-benchmark-master/archive

3. Because this test is of how long it takes to create and populate the subdirectory
`weewx-benchmark-master/public_html`, it must be empty before you start.

```shell
rm -r weewx-benchmark/public_html
rm -r weewx-benchmark-master/public_html
```

4. Run the benchmark, using `weectl report`
4. Run the benchmark. For Version 5, use `weectl report`. For Version 4, use `wee_reports`

```shell
weectl report run --config=weewx-benchmark/weewx.conf
weectl report run --config weewx-benchmark-master/weewx.conf
```

5. The benchmark will print the generation time for the files and images
to standard output. Make sure there are 21 files and 68 images. If not, there
may have been something in `weewx-benchmark/public_html`. Go back and do
may have been something in `weewx-benchmark-master/public_html`. Go back and do
step 3 again.

6. Add your results to the wiki page [_Benchmarks of file and image
Expand Down
22 changes: 11 additions & 11 deletions skins/Seasons/celestial.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
## If extended almanac information is available, do extra calculations.
#if $almanac.hasExtras
## Pick a "None string" on the basis of whether the sun is above or below the horizon
#set $sun_altitude = $almanac.sun.altitude
#if $sun_altitude.raw < 0
#set $sun_altitude = $almanac.sun.alt
#if $sun_altitude < 0
#set $sun_None='<i>%s</i>' % $gettext("Always down")
#else
#set $sun_None='<i>%s</i>' % $gettext("Always up")
Expand Down Expand Up @@ -56,19 +56,19 @@
</tr>
<tr>
<td class="label">$gettext("Azimuth")</td>
<td class="data">$almanac.sun.azimuth.format("%03.1f")</td>
<td class="data">$("%.1f&deg;" % $almanac.sun.az)</td>
</tr>
<tr>
<td class="label">$pgettext("Astronomical", "Altitude")</td>
<td class="data">$sun_altitude.format("%.1f")</td>
<td class="data">$("%.1f&deg;" % $sun_altitude)</td>
</tr>
<tr>
<td class="label">$gettext("Right ascension")</td>
<td class="data">$almanac.sun.topo_ra.format("%03.1f")</td>
<td class="data">$("%.1f&deg;" % $almanac.sun.ra)</td>
</tr>
<tr>
<td class="label">$gettext("Declination")</td>
<td class="data">$almanac.sun.topo_dec.format("%.1f")</td>
<td class="data">$("%.1f&deg;" % $almanac.sun.dec)</td>
</tr>
#if $almanac.next_equinox.raw < $almanac.next_solstice.raw
## The equinox is before the solstice. Display them in order.
Expand Down Expand Up @@ -116,19 +116,19 @@
<tr><td class="label">&nbsp;</td><td class="data">&nbsp;</td></tr>
<tr>
<td class="label">$gettext("Azimuth")</td>
<td class="data">$almanac.moon.azimuth.format("%.1f")</td>
<td class="data">$("%.1f&deg;" % $almanac.moon.az)</td>
</tr>
<tr>
<td class="label">$pgettext("Astronomical", "Altitude")</td>
<td class="data">$almanac.moon.altitude.format("%.1f")</td>
<td class="data">$("%.1f&deg;" % $almanac.moon.alt)</td>
</tr>
<tr>
<td class="label">$gettext("Right ascension")</td>
<td class="data">$almanac.moon.topo_ra.format("%.1f")</td>
<td class="data">$("%.1f&deg;" % $almanac.moon.ra)</td>
</tr>
<tr>
<td class="label">$gettext("Declination")</td>
<td class="data">$almanac.moon.topo_dec.format("%.1f")</td>
<td class="data">$("%.1f&deg;" % $almanac.moon.dec)</td>
</tr>
#if $almanac.next_full_moon.raw < $almanac.next_new_moon.raw
<tr>
Expand Down Expand Up @@ -158,7 +158,7 @@
</div>
</div>
#else
<p>Install <a href="https://pypi.org/project/ephem/"><em>ephem</em></a> for detailed celestial timings.</p>
<p>Install <em>pyephem</em> for detailed celestial timings.</p>
#end if
</div>
</div>
34 changes: 17 additions & 17 deletions skins/Seasons/skin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
###############################################################################

SKIN_NAME = Seasons
SKIN_VERSION = 5.0.0b11
SKIN_VERSION = 4.10.2

###############################################################################

Expand Down Expand Up @@ -266,7 +266,7 @@ SKIN_VERSION = 5.0.0b11
[[day_images]]
x_label_format = %H:%M
bottom_label_format = %x %X
time_length = 27h
time_length = 97200 # 27 hours

[[[daybarometer]]]
[[[[barometer]]]]
Expand Down Expand Up @@ -347,7 +347,7 @@ SKIN_VERSION = 5.0.0b11
plot_type = bar
[[[[lightning_strike_count]]]]
aggregate_type = sum
aggregate_interval = 1h
aggregate_interval = hour
label = Lightning (hourly total)

[[[dayrain]]]
Expand All @@ -356,7 +356,7 @@ SKIN_VERSION = 5.0.0b11
plot_type = bar
[[[[rain]]]]
aggregate_type = sum
aggregate_interval = 1h
aggregate_interval = hour
label = Rain (hourly total)

[[[daywind]]]
Expand All @@ -381,7 +381,7 @@ SKIN_VERSION = 5.0.0b11
plot_type = bar
[[[[ET]]]]
aggregate_type = sum
aggregate_interval = 1h
aggregate_interval = hour
label = Evapotranspiration (hourly total)

[[[dayUV]]]
Expand All @@ -407,7 +407,7 @@ SKIN_VERSION = 5.0.0b11
bottom_label_format = %x %X
time_length = 604800 # 7 days
aggregate_type = avg
aggregate_interval = 1h
aggregate_interval = hour

[[[weekbarometer]]]
[[[[barometer]]]]
Expand Down Expand Up @@ -485,15 +485,15 @@ SKIN_VERSION = 5.0.0b11
plot_type = bar
[[[[lightning_strike_count]]]]
aggregate_type = sum
aggregate_interval = 1d
aggregate_interval = day
label = Lightning (daily total)

[[[weekrain]]]
yscale = None, None, 0.02
plot_type = bar
[[[[rain]]]]
aggregate_type = sum
aggregate_interval = 1d
aggregate_interval = day
label = Rain (daily total)

[[[weekwind]]]
Expand All @@ -518,7 +518,7 @@ SKIN_VERSION = 5.0.0b11
plot_type = bar
[[[[ET]]]]
aggregate_type = sum
aggregate_interval = 1d
aggregate_interval = day
label = Evapotranspiration (daily total)

[[[weekUV]]]
Expand All @@ -543,7 +543,7 @@ SKIN_VERSION = 5.0.0b11
bottom_label_format = %x %X
time_length = 2592000 # 30 days
aggregate_type = avg
aggregate_interval = 3h
aggregate_interval = 10800 # 3 hours
show_daynight = false

[[[monthbarometer]]]
Expand Down Expand Up @@ -622,15 +622,15 @@ SKIN_VERSION = 5.0.0b11
plot_type = bar
[[[[lightning_strike_count]]]]
aggregate_type = sum
aggregate_interval = 1d
aggregate_interval = day
label = Lightning (daily total)

[[[monthrain]]]
yscale = None, None, 0.02
plot_type = bar
[[[[rain]]]]
aggregate_type = sum
aggregate_interval = 1d
aggregate_interval = day
label = Rain (daily total)

[[[monthwind]]]
Expand All @@ -655,7 +655,7 @@ SKIN_VERSION = 5.0.0b11
plot_type = bar
[[[[ET]]]]
aggregate_type = sum
aggregate_interval = 1d
aggregate_interval = day
label = Evapotranspiration (daily total)

[[[monthUV]]]
Expand All @@ -680,7 +680,7 @@ SKIN_VERSION = 5.0.0b11
bottom_label_format = %x %X
time_length = 31536000 # 365 days
aggregate_type = avg
aggregate_interval = 1d
aggregate_interval = day
show_daynight = false

[[[yearbarometer]]]
Expand Down Expand Up @@ -759,15 +759,15 @@ SKIN_VERSION = 5.0.0b11
plot_type = bar
[[[[lightning_strike_count]]]]
aggregate_type = sum
aggregate_interval = 1w
aggregate_interval = week
label = Lightning (weekly total)

[[[yearrain]]]
yscale = None, None, 0.02
plot_type = bar
[[[[rain]]]]
aggregate_type = sum
aggregate_interval = 1w
aggregate_interval = week
label = Rain (weekly total)

[[[yearwind]]]
Expand All @@ -792,7 +792,7 @@ SKIN_VERSION = 5.0.0b11
plot_type = bar
[[[[ET]]]]
aggregate_type = sum
aggregate_interval = 1w
aggregate_interval = week
label = Evapotranspiration (weekly total)

[[[yearUV]]]
Expand Down
10 changes: 6 additions & 4 deletions weewx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
# Set to 1 for extra debug info, otherwise comment it out or set to zero
debug = 0

# If there is no WEEWX_ROOT, its default will be the location of this file.
# So, comment it out.
# Version 5.0.0 does not require a value for WEEWX_ROOT. In its absence,
# it will use the location of this file.
# Earlier version do require a value. Set it to the directory this file is in.
# WEEWX_ROOT = ./

# Whether to log successful operations. May get overridden below.
Expand Down Expand Up @@ -397,9 +398,10 @@ version = 5.0.0b13
# Defaults for SQLite databases
[[SQLite]]
driver = weedb.sqlite
# Directory in which the database files are located, relative to WEEWX_ROOT:
# The directory of the SQLite database.
# For versions earlier than V5.0, change this to an absolute path.
SQLITE_ROOT = archive

# Defaults for MySQL databases
[[MySQL]]
driver = weedb.mysql
Expand Down

0 comments on commit ade633a

Please sign in to comment.