Skip to content

Commit

Permalink
Rename debounced to throttled
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
  • Loading branch information
klingerf committed Sep 11, 2018
1 parent de4f549 commit e2018fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions web/app/js/components/Tap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Tap extends React.Component {
this.api = this.props.api;
this.tapResultsById = {};
this.tapResultFilterOptions = this.getInitialTapFilterOptions();
this.debouncedWebsocketRecvHandler = _.throttle(this.updateTapResults, 500);
this.throttledWebsocketRecvHandler = _.throttle(this.updateTapResults, 500);
this.loadFromServer = this.loadFromServer.bind(this);

this.state = {
Expand Down Expand Up @@ -59,7 +59,7 @@ class Tap extends React.Component {
if (this.ws) {
this.ws.close(1000);
}
this.debouncedWebsocketRecvHandler.cancel();
this.throttledWebsocketRecvHandler.cancel();
this.stopTapStreaming();
this.stopServerPolling();
}
Expand All @@ -79,7 +79,7 @@ class Tap extends React.Component {

onWebsocketRecv = e => {
this.indexTapResult(e.data);
this.debouncedWebsocketRecvHandler();
this.throttledWebsocketRecvHandler();
}

onWebsocketClose = e => {
Expand Down
6 changes: 3 additions & 3 deletions web/app/js/components/TopModule.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class TopModule extends React.Component {
super(props);
this.tapResultsById = {};
this.topEventIndex = {};
this.debouncedWebsocketRecvHandler = _.throttle(this.updateTapEventIndexState, 500);
this.throttledWebsocketRecvHandler = _.throttle(this.updateTapEventIndexState, 500);

this.state = {
error: null,
Expand All @@ -48,7 +48,7 @@ class TopModule extends React.Component {
}

componentWillUnmount() {
this.debouncedWebsocketRecvHandler.cancel();
this.throttledWebsocketRecvHandler.cancel();
this.stopTapStreaming();
}

Expand All @@ -67,7 +67,7 @@ class TopModule extends React.Component {

onWebsocketRecv = e => {
this.indexTapResult(e.data);
this.debouncedWebsocketRecvHandler();
this.throttledWebsocketRecvHandler();
}

onWebsocketClose = e => {
Expand Down

0 comments on commit e2018fe

Please sign in to comment.