summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkarsh Simha <akarsh@kde.org>2016-09-25 02:00:04 (GMT)
committerAkarsh Simha <akarsh@kde.org>2016-09-28 22:16:21 (GMT)
commit37ba58d59222b77c663a460dfeb2fd7611119f4d (patch)
treefdb59a03a1f210af867b8fec245e95eac637e37f
parent33b036190697d614c9f822f700350022461bd089 (diff)
Calculate trig function redundancy within DeepStarComponent::draw()
-rw-r--r--kstars/skycomponents/deepstarcomponent.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/kstars/skycomponents/deepstarcomponent.cpp b/kstars/skycomponents/deepstarcomponent.cpp
index b1c52b8..a04ad2f 100644
--- a/kstars/skycomponents/deepstarcomponent.cpp
+++ b/kstars/skycomponents/deepstarcomponent.cpp
@@ -187,6 +187,7 @@ void DeepStarComponent::draw( SkyPainter *skyp ) {
#ifdef PROFILE_SINCOS
long trig_calls_here = - dms::trig_function_calls;
+ long trig_redundancy_here = - dms::redundant_trig_function_calls;
dms::seconds_in_trig = 0.;
#endif
SkyMap *map = SkyMap::Instance();
@@ -319,7 +320,9 @@ void DeepStarComponent::draw( SkyPainter *skyp ) {
m_skyMesh->inDraw( false );
#ifdef PROFILE_SINCOS
trig_calls_here += dms::trig_function_calls;
+ trig_redundancy_here += dms::redundant_trig_function_calls;
qDebug() << "Spent " << dms::seconds_in_trig << " seconds doing " << trig_calls_here << " trigonometric function calls amounting to an average of " << 1000.0 * dms::seconds_in_trig/double( trig_calls_here ) << " ms per call";
+ qDebug() << "Redundancy of trig calls in this draw: " << double( trig_redundancy_here ) / double( trig_calls_here ) * 100. << "%";
#endif
#else
Q_UNUSED(skyp)