-
-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VCompressor Benchmark #268
VCompressor Benchmark #268
Conversation
It would be nice to show the compress ratio for each method. |
@gaogaotiantian It seems that compress ratio is defined by |
Could you rebase your feature branch on |
I've merge this feature branch on my |
You need to pull the updates from upstream.
|
OK done. Many thanks! |
aha it seems we have a prerequisite pr #273 that need to be reviewed first :D |
#273 is merged in and could you rebase on that again? Thanks! |
Done! |
Codecov Report
@@ Coverage Diff @@
## trace-log-compressor #268 +/- ##
=======================================================
Coverage ? 98.68%
=======================================================
Files ? 21
Lines ? 2205
Branches ? 0
=======================================================
Hits ? 2176
Misses ? 29
Partials ? 0 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@gaogaotiantian The reason why I determined to put
When the |
You only need to move the whole The other thing worth mentioning is that your |
I've tried to write a minimal demo on the problem: class Demo:
def deco(*args, **kargs):
print(args)
print(kargs)
def _wrapper(*args, **kargs):
pass
return _wrapper
@deco
def func(self):
pass
demo = Demo()
demo.func() And this code works as expected and the output is as follows.
If I add a randomly chosen parameter for the # ...
@deco(p=5)
def func(self):
pass
# ... It will throw an errror:
According to the output, the argument that should be the decorated function is magically missing. Only parameter(s) for the decorator is/are left. And it seems that the return value of the decorator changed to a If now I change the return value of the wrapper function like this: # ...
def deco(*args, **kargs):
print(args)
print(kargs)
def _wrapper(*args, **kargs):
return 123
return _wrapper
# ... Error info:
It seems that the return value of the decorator changes to the return value of the wrapper function. I'm more confused right now. Is there any part that I miss? Or is it a worthy point that a new video can be made for? 😄 |
This is a two-piece question. I'll make a video about the decorator in class part because that's actually a pretty common requirements. However, the answer could still be found(with some thoughts) in https://www.bilibili.com/video/BV1mB4y1m7FT/
I'd recommend https://www.bilibili.com/video/BV19U4y1d79C/ for its answer. It's not about the class anymore. It's about how to make a decorator support usage with and without arguments. Like I said in my previous comment, your |
OK. I'll check it out. Thanks again! |
I've put up an output example of this benchmark test in the top post. |
@Sefank is there a way to confirm the requested change is made before requesting a review? I'm seeing the review request but my change request is still there. |
I don't really know much about it. I guess that giving it a new review with approval would be ok and previous change-requested reviews just appear here as historical records? |
* Added VCompressor Space-wise and Time-wise Benchmark
* Added VCompressor Space-wise and Time-wise Benchmark
* Added VCompressor Space-wise and Time-wise Benchmark
As #249 mentioned, VCompressor is designed for a decent compress ratio. Here provides a benchmark framework to easily calculate performance improvement space-wise and time-wise on specific test cases.
Note: Here, I chose to use LZMA, famous for its high compress ratio on average files, as a baseline in terms of space-wise benchmark.
Main Features:
Other Important Change Log:
repeat
(previouslyloop_time
) in_benchmark
is now implemented correctlyOutput Example of this Benchmark Test: