提交 6ad641e6 编写于 作者: H Heikki Linnakangas

Remove code that did nothing.

setMotionStatsForGpmon() didn't actually do anything. It just set a bunch
of local variables. And the structs were simply unused.
上级 f2010f7e
......@@ -164,23 +164,6 @@ bool isMotionGather(const Motion *m)
&& m->numOutputSegs == 1);
}
/*
* Set the statistic info in gpmon packet.
*/
static void
setMotionStatsForGpmon(MotionState *node)
{
ChunkTransportState *transportStates = node->ps.state->interconnect_context;
int motionId = ((Motion *) node->ps.plan)->motionID;
ChunkTransportStateEntry *transportEntry = NULL;
getChunkTransportState(transportStates, motionId, &transportEntry);
uint64 avgAckTime = 0;
if (transportEntry->stat_count_acks > 0)
avgAckTime = transportEntry->stat_total_ack_time / transportEntry->stat_count_acks;
}
/* ----------------------------------------------------------------
* ExecMotion
* ----------------------------------------------------------------
......@@ -245,7 +228,6 @@ ExecMotion(MotionState * node)
{
Gpmon_Incr_Rows_In(GpmonPktFromMotionState(node));
Gpmon_Incr_Rows_Out(GpmonPktFromMotionState(node));
setMotionStatsForGpmon(node);
}
#ifdef MEASURE_MOTION_TIME
gettimeofday(&stopTime, NULL);
......@@ -335,7 +317,6 @@ execMotionSender(MotionState * node)
/* doSendTuple() may have set node->stopRequested as a side-effect */
Gpmon_Incr_Rows_Out(GpmonPktFromMotionState(node));
setMotionStatsForGpmon(node);
CheckSendPlanStateGpmonPkt(&node->ps);
if (node->stopRequested)
......
......@@ -1416,19 +1416,6 @@ typedef struct PlanState
gpmon_packet_t gpmon_pkt;
} PlanState;
typedef struct Gpmon_NameUnit_MaxVal
{
char *name;
char *unit;
int64 maxval;
} Gpmon_NameUnit_MaxVal;
typedef struct Gpmon_NameVal_Text
{
char *name;
char *value;
} Gpmon_NameVal_Text;
/* Gpperfmon helper functions defined in execGpmon.c */
extern void CheckSendPlanStateGpmonPkt(PlanState *ps);
extern void EndPlanStateGpmonPkt(PlanState *ps);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册