This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fury.git
The following commit(s) were added to refs/heads/main by this push:
new 5d5b7c4c chore(dart): remove unused `dart/fury-test/lib/main.dart`
(#2181)
5d5b7c4c is described below
commit 5d5b7c4c4f03ade7fe375ccd330208e5dfb97540
Author: LouShaokun <[email protected]>
AuthorDate: Thu Apr 24 17:59:47 2025 +0800
chore(dart): remove unused `dart/fury-test/lib/main.dart` (#2181)
<!--
**Thanks for contributing to Fury.**
**If this is your first time opening a PR on fury, you can refer to
[CONTRIBUTING.md](https://github.com/apache/fury/blob/main/CONTRIBUTING.md).**
Contribution Checklist
- The **Apache Fury (incubating)** community has restrictions on the
naming of pr titles. You can also find instructions in
[CONTRIBUTING.md](https://github.com/apache/fury/blob/main/CONTRIBUTING.md).
- Fury has a strong focus on performance. If the PR you submit will have
an impact on performance, please benchmark it first and provide the
benchmark result here.
-->
## What does this PR do?
remove unused `dart/fury-test/lib/main.dart`
## Related issues
<!--
Is there any related issue? Please attach here.
- #xxxx0
- #xxxx1
- #xxxx2
-->
## Does this PR introduce any user-facing change?
<!--
If any user-facing interface changes, please [open an
issue](https://github.com/apache/fury/issues/new/choose) describing the
need to do so and update the document if necessary.
-->
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?
## Benchmark
<!--
When the PR has an impact on performance (if you don't know whether the
PR will have an impact on performance, you can submit the PR first, and
if it will have impact on performance, the code reviewer will explain
it), be sure to attach a benchmark data here.
-->
---
dart/packages/fury-test/lib/main.dart | 87 -----------------------------------
1 file changed, 87 deletions(-)
diff --git a/dart/packages/fury-test/lib/main.dart
b/dart/packages/fury-test/lib/main.dart
deleted file mode 100644
index d86acd14..00000000
--- a/dart/packages/fury-test/lib/main.dart
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import 'dart:convert';
-import 'dart:typed_data';
-
-import 'package:fury/fury.dart';
-
-import 'entity/complex_obj_4.dart';
-
-void main(){
- ComplexObject4 obj = ComplexObject4();
- obj.f1 = 'SSSSSSSSSSSSSSSS';
- obj.f2 = "abc";
- obj.f3 = List.generate(100, (index) => index)
- .map((e) => e.toString())
- .toList()
- .cast<String>();
- obj.f4 = List.generate(100, (index) => index)
- .asMap()
- .map((k, v) => MapEntry(k, v.toDouble()));
- obj.f5 = 127;
- obj.f6 = 65535;
- obj.f7 = 123;
- obj.f8 = 0x7FFFFFFFFFFFFFFF;
- obj.f9 = 0.5;
- obj.f10 = 1 / 3.0;
- obj.f11 = List.generate(100, (index) => index)
- .map((e) => (e * 1.0))
- .toList()
- .cast<double>();
- obj.f12 = List.generate(100, (index) => index)
- .map((e) => e.toInt())
- .toList();
-
- Stopwatch sw = Stopwatch()..start();
- for(int i = 0; i < 100000; ++i){
- String str = jsonEncode(obj);
- }
- sw.stop();
- print('toJson: ${sw.elapsedMilliseconds} ms');
-
- Fury fury = Fury(refTracking: true);
- fury.register($ComplexObject4);
- sw = Stopwatch()..start();
- for(int i = 0; i < 100000; ++i){
- fury.toFury(obj);
- }
- sw.stop();
- print('fury.toFury: ${sw.elapsedMilliseconds} ms');
-
- // test deserialization
- sw = Stopwatch()..start();
- String str = jsonEncode(obj);
- for(int i = 0; i < 100000; ++i){
- Map<String, dynamic> map = jsonDecode(str);
- ComplexObject4 obj2 = ComplexObject4.fromJson(map);
- }
- sw.stop();
- print('fromJson: ${sw.elapsedMilliseconds} ms');
-
- sw = Stopwatch()..start();
- Uint8List bytes = fury.toFury(obj);
- for(int i = 0; i < 100000; ++i){
- ComplexObject4 obj2 = fury.fromFury(bytes) as ComplexObject4;
- }
-
- sw.stop();
- print('fury.fromFury: ${sw.elapsedMilliseconds} ms');
-
-}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]