diff --git a/src/callgrind/tpCallgrind.erl b/src/callgrind/tpCallgrind.erl index f638176..fe20bb8 100644 --- a/src/callgrind/tpCallgrind.erl +++ b/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]). diff --git a/src/fileHer/tpFileReader.erl b/src/fileHer/tpFileReader.erl index 4f944a3..23db90e 100644 --- a/src/fileHer/tpFileReader.erl +++ b/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]). diff --git a/src/messages/tpMessages.erl b/src/messages/tpMessages.erl index 696ef9f..1f0374c 100644 --- a/src/messages/tpMessages.erl +++ b/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"). diff --git a/src/messages/tpMessagesSeqdiag.erl b/src/messages/tpMessagesSeqdiag.erl index 0841570..a864dcc 100644 --- a/src/messages/tpMessagesSeqdiag.erl +++ b/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"). diff --git a/src/tracer/tpFileTracer.erl b/src/tracer/tpFileTracer.erl index c081fab..4b027ed 100644 --- a/src/tracer/tpFileTracer.erl +++ b/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]). diff --git a/src/tracer/tpRawConsoleTracer.erl b/src/tracer/tpRawConsoleTracer.erl index 4a6f306..6f4c793 100644 --- a/src/tracer/tpRawConsoleTracer.erl +++ b/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]). diff --git a/src/tracer/tpSocketTracer.erl b/src/tracer/tpSocketTracer.erl index 207ea3a..a414459 100644 --- a/src/tracer/tpSocketTracer.erl +++ b/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]). diff --git a/src/tracer/tpTracer.erl b/src/tracer/tpTracer.erl index 7c7b619..8bfb386 100644 --- a/src/tracer/tpTracer.erl +++ b/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). diff --git a/src/tracer/tpTracerPool.erl b/src/tracer/tpTracerPool.erl index b6feca8..f36844c 100644 --- a/src/tracer/tpTracerPool.erl +++ b/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). diff --git a/src/utils/tpSocketClient.erl b/src/utils/tpSocketClient.erl index 0fdbdf6..af684bc 100644 --- a/src/utils/tpSocketClient.erl +++ b/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}} diff --git a/src/utils/tpTerm.erl b/src/utils/tpTerm.erl index 88baab7..5fd3098 100644 --- a/src/utils/tpTerm.erl +++ b/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 -> <> = Term, <>; truncate(Term, Depth) when is_list(Term), Depth =:= ?MAX_DEPTH ->