ソースを参照

ft: 代码修改

master
SisMaker 4年前
コミット
fc33f823aa
11個のファイルの変更5行の追加160行の削除
  1. +0
    -14
      src/callgrind/tpCallgrind.erl
  2. +0
    -14
      src/fileHer/tpFileReader.erl
  3. +0
    -14
      src/messages/tpMessages.erl
  4. +0
    -14
      src/messages/tpMessagesSeqdiag.erl
  5. +0
    -14
      src/tracer/tpFileTracer.erl
  6. +0
    -14
      src/tracer/tpRawConsoleTracer.erl
  7. +0
    -14
      src/tracer/tpSocketTracer.erl
  8. +0
    -14
      src/tracer/tpTracer.erl
  9. +0
    -14
      src/tracer/tpTracerPool.erl
  10. +1
    -15
      src/utils/tpSocketClient.erl
  11. +4
    -19
      src/utils/tpTerm.erl

+ 0
- 14
src/callgrind/tpCallgrind.erl ファイルの表示

@ -1,17 +1,3 @@
%% Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
%%
%% This package, Looking Glass, is double-licensed under the Mozilla
%% Public License 1.1 ("MPL") and the Apache License version 2
%% ("ASL"). For the MPL, please see LICENSE-MPL-RabbitMQ. For the ASL,
%% please see LICENSE-APACHE2.
%%
%% This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
%% either express or implied. See the LICENSE file for specific language governing
%% rights and limitations of this software.
%%
%% If you have any questions regarding licensing, please contact us at
%% info@rabbitmq.com.
-module(tpCallgrind).
-export([patterns/0]).

+ 0
- 14
src/fileHer/tpFileReader.erl ファイルの表示

@ -1,17 +1,3 @@
%% Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
%%
%% This package, Looking Glass, is double-licensed under the Mozilla
%% Public License 1.1 ("MPL") and the Apache License version 2
%% ("ASL"). For the MPL, please see LICENSE-MPL-RabbitMQ. For the ASL,
%% please see LICENSE-APACHE2.
%%
%% This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
%% either express or implied. See the LICENSE file for specific language governing
%% rights and limitations of this software.
%%
%% If you have any questions regarding licensing, please contact us at
%% info@rabbitmq.com.
-module(tpFileReader).
-export([fold/3]).

+ 0
- 14
src/messages/tpMessages.erl ファイルの表示

@ -1,17 +1,3 @@
%% Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
%%
%% This package, Looking Glass, is double-licensed under the Mozilla
%% Public License 1.1 ("MPL") and the Apache License version 2
%% ("ASL"). For the MPL, please see LICENSE-MPL-RabbitMQ. For the ASL,
%% please see LICENSE-APACHE2.
%%
%% This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
%% either express or implied. See the LICENSE file for specific language governing
%% rights and limitations of this software.
%%
%% If you have any questions regarding licensing, please contact us at
%% info@rabbitmq.com.
-module(tpMessages).
-include("eTpf.hrl").

+ 0
- 14
src/messages/tpMessagesSeqdiag.erl ファイルの表示

@ -1,17 +1,3 @@
%% Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
%%
%% This package, Looking Glass, is double-licensed under the Mozilla
%% Public License 1.1 ("MPL") and the Apache License version 2
%% ("ASL"). For the MPL, please see LICENSE-MPL-RabbitMQ. For the ASL,
%% please see LICENSE-APACHE2.
%%
%% This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
%% either express or implied. See the LICENSE file for specific language governing
%% rights and limitations of this software.
%%
%% If you have any questions regarding licensing, please contact us at
%% info@rabbitmq.com.
-module(tpMessagesSeqdiag).
-include("eTpf.hrl").

+ 0
- 14
src/tracer/tpFileTracer.erl ファイルの表示

@ -1,17 +1,3 @@
%% Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
%%
%% This package, Looking Glass, is double-licensed under the Mozilla
%% Public License 1.1 ("MPL") and the Apache License version 2
%% ("ASL"). For the MPL, please see LICENSE-MPL-RabbitMQ. For the ASL,
%% please see LICENSE-APACHE2.
%%
%% This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
%% either express or implied. See the LICENSE file for specific language governing
%% rights and limitations of this software.
%%
%% If you have any questions regarding licensing, please contact us at
%% info@rabbitmq.com.
-module(tpFileTracer).
-export([start_link/2]).

+ 0
- 14
src/tracer/tpRawConsoleTracer.erl ファイルの表示

@ -1,17 +1,3 @@
%% Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
%%
%% This package, Looking Glass, is double-licensed under the Mozilla
%% Public License 1.1 ("MPL") and the Apache License version 2
%% ("ASL"). For the MPL, please see LICENSE-MPL-RabbitMQ. For the ASL,
%% please see LICENSE-APACHE2.
%%
%% This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
%% either express or implied. See the LICENSE file for specific language governing
%% rights and limitations of this software.
%%
%% If you have any questions regarding licensing, please contact us at
%% info@rabbitmq.com.
-module(tpRawConsoleTracer).
-export([start_link/2]).

+ 0
- 14
src/tracer/tpSocketTracer.erl ファイルの表示

@ -1,17 +1,3 @@
%% Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
%%
%% This package, Looking Glass, is double-licensed under the Mozilla
%% Public License 1.1 ("MPL") and the Apache License version 2
%% ("ASL"). For the MPL, please see LICENSE-MPL-RabbitMQ. For the ASL,
%% please see LICENSE-APACHE2.
%%
%% This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
%% either express or implied. See the LICENSE file for specific language governing
%% rights and limitations of this software.
%%
%% If you have any questions regarding licensing, please contact us at
%% info@rabbitmq.com.
-module(tpSocketTracer).
-export([start_link/2]).

+ 0
- 14
src/tracer/tpTracer.erl ファイルの表示

@ -1,17 +1,3 @@
%% Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
%%
%% This package, Looking Glass, is double-licensed under the Mozilla
%% Public License 1.1 ("MPL") and the Apache License version 2
%% ("ASL"). For the MPL, please see LICENSE-MPL-RabbitMQ. For the ASL,
%% please see LICENSE-APACHE2.
%%
%% This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
%% either express or implied. See the LICENSE file for specific language governing
%% rights and limitations of this software.
%%
%% If you have any questions regarding licensing, please contact us at
%% info@rabbitmq.com.
-module(tpTracer).
%-behavior(erl_tracer).

+ 0
- 14
src/tracer/tpTracerPool.erl ファイルの表示

@ -1,17 +1,3 @@
%% Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
%%
%% This package, Looking Glass, is double-licensed under the Mozilla
%% Public License 1.1 ("MPL") and the Apache License version 2
%% ("ASL"). For the MPL, please see LICENSE-MPL-RabbitMQ. For the ASL,
%% please see LICENSE-APACHE2.
%%
%% This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
%% either express or implied. See the LICENSE file for specific language governing
%% rights and limitations of this software.
%%
%% If you have any questions regarding licensing, please contact us at
%% info@rabbitmq.com.
-module(tpTracerPool).
-behaviour(supervisor).

+ 1
- 15
src/utils/tpSocketClient.erl ファイルの表示

@ -1,17 +1,3 @@
%% Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
%%
%% This package, Looking Glass, is double-licensed under the Mozilla
%% Public License 1.1 ("MPL") and the Apache License version 2
%% ("ASL"). For the MPL, please see LICENSE-MPL-RabbitMQ. For the ASL,
%% please see LICENSE-APACHE2.
%%
%% This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
%% either express or implied. See the LICENSE file for specific language governing
%% rights and limitations of this software.
%%
%% If you have any questions regarding licensing, please contact us at
%% info@rabbitmq.com.
-module(tpSocketClient).
-behavior(gen_statem).
@ -84,7 +70,7 @@ process_events(info, {tcp, Socket, Bin}, State = #state{socket = Socket, io_devi
NumEvents = NumEvents0 + 1,
if
MaxEvents =:= NumEvents ->
ok = file:write(IoDevice, lz4f:compress_frame(Buffer)),
ok = file:write(IoDevice, zip:compress_frame(Buffer)),
{keep_state, State#state{events_this_frame = 0, buffer = <<>>}};
true ->
{keep_state, State#state{events_this_frame = NumEvents, buffer = Buffer}}

+ 4
- 19
src/utils/tpTerm.erl ファイルの表示

@ -1,28 +1,13 @@
%% Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
%%
%% This package, Looking Glass, is double-licensed under the Mozilla
%% Public License 1.1 ("MPL") and the Apache License version 2
%% ("ASL"). For the MPL, please see LICENSE-MPL-RabbitMQ. For the ASL,
%% please see LICENSE-APACHE2.
%%
%% This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
%% either express or implied. See the LICENSE file for specific language governing
%% rights and limitations of this software.
%%
%% If you have any questions regarding licensing, please contact us at
%% info@rabbitmq.com.
%% Going for hardcoded values for now. We can't spend time
%% looking up inside a record or map for this.
-module(tpTerm).
%% 使
-export([truncate/1]).
-export([truncate/2]).
-define(MAX_DEPTH, 5).
-define(MAX_BINARY_SIZE, 128).
-define(MAX_BITSTRING_SIZE, ?MAX_BINARY_SIZE * 8).
-define(MAX_BITS_SIZE, ?MAX_BINARY_SIZE * 8).
-define(MAX_DATA_STRUCTURES, 5).
-define(MAX_LIST_LENGTH, 32).
-define(MAX_MAP_SIZE, 32).
@ -33,7 +18,7 @@ truncate(Term) ->
truncate(_, Depth) when Depth > ?MAX_DEPTH ->
'$truncated';
truncate(Term, _) when bit_size(Term) > ?MAX_BITSTRING_SIZE ->
truncate(Term, _) when bit_size(Term) > ?MAX_BITS_SIZE ->
<<Truncated:?MAX_BINARY_SIZE/binary, _/bits>> = Term,
<<Truncated/binary, "$truncated">>;
truncate(Term, Depth) when is_list(Term), Depth =:= ?MAX_DEPTH ->

読み込み中…
キャンセル
保存