Skip to content

Commit

Permalink
Fixed graph missing labels (tex problem)
Browse files Browse the repository at this point in the history
  • Loading branch information
qnxor committed Mar 11, 2015
1 parent 776553c commit 3d7892f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Changelog
=========

- 1.5.2, 2015-03-11 - Fixed graph missing labels (tex problem)
- 1.5.1, 2015-03-10 - Fixed FFT binary and number of default threads (cores - 1)
- 1.5.0, 2015-03-10 - Plots power draw, indicate stats, detects Tmax and TDP overruns
- 1.4.0, 2015-03-09 - Added my own FFT test (emulates humane CPU stress, should not throttle)
Expand Down
46 changes: 30 additions & 16 deletions macoh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -799,15 +799,16 @@ moh-plot () {
papersize 20 10
size 20 10
!margins 2 2 2 2
set font texcmr
set titlescale 0.9
set font texcmss
set titlescale 1
!set texlabels 1
Tmax = arg(6)
Tmax2 = 0.95*Tmax
TDP = arg(7)
begin graph
title arg$(2) dist 0.2
title arg$(2) dist 0.5
xtitle "Time (sec)"
x2axis off
y2title "CPU Frequency (MHz)" color blue
! y2side color blue
axis grid
Expand All @@ -818,11 +819,14 @@ moh-plot () {
yaxis min 0 max 120 dticks 10 dsubticks 3.3333
y2axis min 400 max 4000 dticks 300 ftick 400
! xnames from d1
key pos bl nobox offset 2.5 0.25
! key pos bl nobox offset 2.5 0.25
data arg$(1) ignore 1 d1=c1,c9 d2=c1,c2 d3=c1,c3
d1 line color red key arg$(3)
d2 x2axis y2axis line color blue key arg$(5)
d3 line color green key arg$(4)
! d1 line color red key arg$(3)
! d2 x2axis y2axis line color !blue key ""+arg$(5)+""
! d3 line color green key arg$(4)
d1 line color red
d2 x2axis y2axis line color blue
d3 line color green
let d4 = Tmax
!let d5 = Tmax2
let d6 = TDP
Expand All @@ -831,37 +835,46 @@ moh-plot () {
d6 lstyle 2 color green
end graph
begin key
position bl
!nobox
offset 2.5 0.25
line color red text arg$(3)
line color blue text arg$(5)
line color green text arg$(4)
end key
! Left axis labels, we want multiple colors so we
! use tex instead of ytitle
amove xg(xgmax/100) yg(Tmax+1)
set color red
tex "Tmax="+format$(Tmax,"fix 1")+"C" name tmax
write "Tmax="+format$(Tmax,"fix 1")+"C"
!amove xg(xgmax/100) yg(Tmax2+1)
!set color red
!tex "0.95 Tmax" name tmax2
amove xg(xgmax/100) yg(TDP+1)
set color green
tex "TDP="+format$(TDP,"fix 1")+"W" name tmax
write "TDP="+format$(TDP,"fix 1")+"W"
amove 2.1 2.25
set color green
begin rotate 90
tex "CPU Power (W)" name texpow
write "CPU Power (W)"
end rotate
amove 2.1 4.9
set color black
begin rotate 90
tex "," name texcomma
write ","
end rotate
amove 2.1 5.25
set color red
begin rotate 90
tex "CPU Temp (C)" name textemp
write "CPU Temp (C)"
end rotate
GLE

Expand All @@ -884,6 +897,7 @@ moh-plot () {
local maxtemp=`cut -f9 -d, $tmp/ipg.csv | sed 's/[[:space:]]//g' | sort -n | tail -1`
local maxpow=`cut -f3 -d, $tmp/ipg.csv | sed 's/[[:space:]]//g' | sort -n | tail -1`
local maxfreq=`cut -f2 -d, $tmp/ipg.csv | sed 's/[[:space:]]//g' | sort -n | tail -1`
printf -v maxpow "%.1f" $maxpow

# get TDP and Tmax
local Tmax=`grep -oE '^Max Temp = [0-9.]+' $tmp/ipgvals.log`
Expand Down Expand Up @@ -944,9 +958,9 @@ moh-plot () {
$tmp/ipg.gle \
$tmp/ipg.csv \
"$graphtitle" \
"Temp (max:${maxtemp}, avg:${avgtemp}, \\tex{$>\!0.95\cdot$}Tmax:${overlimtemp})" \
"Power (max:${maxpow}, avg:${avgpow}, \\tex{$>$}TDP:${overlimpow})" \
"Freq (max:${maxfreq}, avg:${avgfreq})" \
"Temp, max:${maxtemp}, avg:${avgtemp}, above 0.95Tmax:${overlimtemp}" \
"Power, max:${maxpow}, avg:${avgpow}, above TDP:${overlimpow}" \
"Freq, max:${maxfreq}, avg:${avgfreq}" \
$Tmax \
$TDP \
>/dev/null
Expand Down Expand Up @@ -1093,7 +1107,7 @@ do

echo -n "
-----------------------------------------------------------------------------
MacOH v1.5.1. Quit all other apps before launching.
MacOH v1.5.2. Quit all other apps before launching.
----------------------------------------------------------------------- TESTS
F. FFT multi-threaded (+ CPU stress)
X. Short x264 encode (++ CPU stress, 5-6 mins on Core i7-4850HQ)
Expand Down
2 changes: 1 addition & 1 deletion make-release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

rm -f macoh.sh
rm -f macoh.zip
zip macoh.zip CHANGELOG.md LICENSE README.md fftwtest macoh.conf macoh.sh

0 comments on commit 3d7892f

Please sign in to comment.